ARES commander provide .NET API to author third party Plugin Software for ARES Commander.
Supported API Sets
ARES Supports 3 API sets which can be used independently
- .NET Classic API
- ARES COM API
- CFx .NET(SWIG generated .NET API version of ARES C++ SDK)
API | Assembly Names | Nature of Plugin | Loading Mechanism | |
---|---|---|---|---|
NET Classic API | TD_Mgd_x.xx_xx.dll FxCoreMgd_x.xx_xx.dll | In-process | Use NETLOAD command | |
ARES COM API | ARESC.exe OdaX_x.xx_xx.dll TD_Mgd_x.xx_xx.dll(For In-process plugin only) | In-process Out-process |
| |
CFx .NET | ArgonMGD.dll TD_SwigCoreMgd.dll TD_SwigDbMgd.dll TG_SwigDbMgd.dll TD_Mgd_x.xx_xx.dll | In-process | Use NETLOAD command |
.NET Classic Plugin:
- Create a new C# or VB.NET project using Visual Studio project Wizard( **minimum requirement .NET Framework v4.5)
- Add references from Solution Explore of TD_Mgd_x.xx_xx*.dll and FxCoreMgd_x.xx_xx.dll by Browsing ARES installation folder.
- Developer can see available NameSpaces,Classes,Methods, Properties in each assembly using Object Browser
- Rename Class1.cs tp PluginCommands.cs it will change class Class1 to class PluginCommands like below.
- Defining a command use Teigha.Runtime namespace to access CommandMethod method atrribute as below and add a method i.e AnyFunctionName having this attribute. It define MySampleCommand command which can be executed on ARES Commandline.
- The above procedure is similar to all type of in-process plugn.
- Build the sample project is will generate PluginCommans.dll or <YourProjectName.dll>
- Run ARES and type NETLOAD on command line it will prompt to load the plugin dll, browse PluginCommands.dll and Load, message of successful loading will appear on command line.
- Run MySampleCommand AnyFunctionName method will be executed.
Accessing Application Object
Accessing Documents and ActiveDocument
From application object one can access document manager, Document Manager has peroperties and Methods by which one can access active document and also can add new document or open existing drawings.
Promping for User input
For user IO Editor class is responsible, one can get it from Document and all related class for UserIO are available in Teigha.EditorInput namespace.