ARES Commander supports three .NET API sets that you can use independently. Now here we’ll going to discuss about CFx. NET(.NET ARES) and listed it’s differences with .NET Classic API's coding.
...
API | .NET Classic API | CFx .NET (.NET ARES) |
---|---|---|
Assembly Names | TD_Mgd_x.xx_xx.dll FxCoreMgd_x.xx_xx.dll | ArgonMGD.dll TD_SwigCoreMgd.dll TD_SwigDbMgd.dll TG_SwigDbMgd.dll TD_Mgd_x.xx_xx.dll |
Nature of Plugin | In-process | In-process |
Loading Mechanism | Use the NETLOAD command | Use the NETLOAD command |
Compatibility | AutoCAD compatible | ARES specific, not vailable available in other CADs |
Access Document | Document document = Teigha.ApplicationServices.Application.DocumentManager.MdiActiveDocument; | CFxDocument pFxDocument = PCADGlobals.FXAPI().GetFxDocument(); |
Access Database | Database db = document.Database; | CFxDatabase pFxDatabase = pFxDocument.GetFxDatabase(); |
Prompting For User Input | PromptIntegerOptions op = new PromptIntegerOptions("Input a positive integer"); | CFxUserIO pFxUserIO = pFxDocument.GetFxUserIO(); pFxUserIO.GetInt |
Lisp Function Creation | Possible to create Lisp Functions. Using | Cannot create Lisp Functions. |
.NET Project Type | .NET Class Library | .NET Class Library |
Notifications | via Events | via Reactor classes |
Commands | Using command method Attribute | Directly inherit from CFxCommand and add instance of this class to command stack or Using command method Attribute OR Using command method Attribute |
UI Controls | Ribbon and Palettes API available | Not available |
...