Extension Applications

Land Desktop Map 3D Samples

 
Extension Applications
 
 
 

The samples are constructed as extension applications. They are built as DLLs, and are loaded into Map from the command-line. As part of the load process the loader calls the entry point in the application to initialize it. The ity of the application is accessed by way of commands executed at the command-line.

The entry point is the Initialize() method in a class derived from Autodesk.AutoCAD.Runtime.IExtensionApplication. You point the loader to this method by putting the following line in the AssemblyInfo.cs in the Properties folder: [assembly: Autodesk.AutoCAD.Runtime.ExtensionApplication(typeof(<your Class Derived From Autodesk.AutoCAD.Runtime.IExtensionapplication))]. To learn more about this open <Map 3D SDK root folder>\docs\arxdoc.chm and search on IExtensionApplication.

To associate a command entered at the Map command-line with a method in a class in your application do the following. To learn more about this open <Map 3D SDK root folder>\docs\arxdoc.chm and search on CommandClass.

  1. In your commands class precede the method with an attribute like the following: [CommandMethod("MyCommand")]
  2. In the AssemblyInfo.cs file in the Properties folder, add a line like the following: [assembly: Autodesk.AutoCAD.Runtime.CommandClass(typeof(MyCommandClass))].