Professional Documents
Culture Documents
How To Create An AS - NET Addin
How To Create An AS - NET Addin
NET Addin
Advance Steel (starting with version 2015) supports loading and executing external code in the form of .NET assemblies. We
refer to this as “Plugins” or “Addins”.
The steps required to create, load and get code inside such an assembly executed are detailed below:
(Examples are given below for c# but all languages supported by the .NET framework should work just as well)
namespace TestNamespace
{
public sealed class Plugin : IExtensionApplication
{
void IExtensionApplication.Initialize()
{
}
void IExtensionApplication.Terminate()
{
}
}
}
(Notice the type given as parameter: it is the type of the class which implements “IExtensionApplication”)
This is what makes your .Net framework dll an Advance Steel Addin.
4. Create a new “command” class – this is where Advance Steel calls you when the user types the command you
register in AutoCAD
6. Inside your “Command” class you should create a method and decorate it with the “CommandMethodAttribute”
attribute. The attribute takes as parameters a
groupName - the group name where to add the command to. If the group doesn't exist, it is
created before the command is added.
globalName - command name to add. This name represents the global or untranslated name
localizedNameId - command name to add. This name represents the local or translated name
flags - Flags associated with the command.
7. In order to be able to compile, you will need to add references to your project several of the following modules:
The modules can be found in the following folder: C:\Program Files\Autodesk\AutoCAD 2018\ADVS\.
[HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AdvanceSteel\<Advance_Steel_ Version_Number>
\NETAddins\<Addin_Name>]
"InstallLocation"="<dll_path>\<file_name>"
This key is used by Advance Steel to automatically load your addin on startup. More details about this can be found here:
http://help.autodesk.com/view/ADSTPR/2018/ENU/?guid=GUID-B1F6F472-52E6-49B7-851F-1D8E1519F850