Documente Academic
Documente Profesional
Documente Cultură
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)
TransactionManager.startTransaction();
//your code here
TransactionManager.endTransaction();
DocumentManager.unlockCurrentDocument();
}
}
5. Add a new Informational Attribute directive:
assembly: CommandClassAttribute(typeof(TestNamespace.TestClass))]
Notice again the type given as parameter: it is the type of the class in which you implement a
Command
Only inside classes for which such information exists can register commands
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:
ASNetRuntime
ASMgd
ASGeometryMgd
ASCADLinkMgd
ASProfilesMgd
ASModelerMgd
\DSCCommon
\implementation\Bin
\Kernel\implementation\Bin
\DSCCommon
\implementation\Bin
\Kernel\implementation\Bin
\DSCCommon
\implementation\Bin
\DSCCommon
\implementation\Bin
The names of the modules listed above are usually decorated with some more numbers and /
or letters related to the Advance Steel version to which they belong, 32 / 64 bit architecture,
8. Add a new registry key
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AdvanceSteel\<Advance_Steel_ Version_Number>
\NETAddins\<Addin_Name>]
"InstallLocation"="<dll_path>\<file_name>"