Interact with Other Windows Applications
 
 
 

AutoCAD. ActiveX technology allows you to exchange information easily with other ActiveX-enabled applications such as Microsoft Excel or Microsoft Word. This capability allows you to collect, store, and present AutoCAD information in formats other than the AutoCAD drawing. You can also read information from these applications back into AutoCAD to direct the creation or manipulation of AutoCAD objects. An example of using this technology is to create a bill of materials as a Microsoft Excel spreadsheet from the objects in an AutoCAD drawing.

You have already learned how to write code using the AutoCAD ActiveX Object Model. Exchanging information with other ActiveX-enabled applications involves simply referencing the other applications' ActiveX Object Model and writing the code necessary to utilize their objects.

NoteThis chapter provides only a brief introduction to the capabilities of cross-application programming. This material is not AutoCAD-specific, and as such it is discussed in both Microsoft documentation and independent programming guides.

To exchange information across ActiveX Object Models

  1. Reference the other applications' ActiveX Object Model.

    This will make your code aware of the names and relationships of the objects in the other Object Model.

  2. Create an instance of the other application.

    This will create (instantiate) valid objects for the basic objects in the other Object Model.

  3. Write your code utilizing both the AutoCAD Object Model and the other applications' Object Model.

    This is where the exchange of data takes place.