AcadMap object

AutoCAD Map 3D ActiveX

AcadMap object

Top-level object for accessing other objects.

Contains drives aliases, projects, and error stack collections and the system options object.

Created by getting an AutoCAD Automation interface object.

AutoCAD Map Automation and AutoCAD Automation are integrated APIs. Using AutoCAD Automation, you get an AcadMap object. AutoCAD Map Automation organizes objects in a tree-like fashion with AcadMap at the top level. AcadMap contains lower-level objects, and these objects contain even lower-level objects.You navigate the hierarchy of contained objects to access AutoCAD Map functionality. For example, from the contained Projects, you get a Project, and access lower levels of functionality through the query, drawing set, object data tables, project options, and other objects.

The following code creates an AcadMap object and gets the project associated with the active drawing.

Dim amap As AcadMap

Dim prj As Project

 

Set amap = ThisDrawing.Application. _

GetInterfaceObject("AutoCADMap.Application") 

Set prj = amap.Projects(ThisDrawing)