Instantiating the Parent Object in the Macro Editor
Go Up to Automation Objects Programmer's Guide
The DiagramManager is the parent-level object required to access all other ER Studio Data Architect objects. The DiagramManager object is instantiated when you start the Macro Editor, which means you can immediately start using this object; you do not need to create it. Begin your code with:
Dim ActiveDiagram as Diagram
Set ActiveDiagram = DiagramManager.ActiveDiagram
If you are writing an external application, the parent object must be instantiated as ERStudio.Application. See Instantiating the Parent Object in an External Application.