images

Storing and Retrieving Custom Data

There are times when it would be nice to have a custom program store values and then retrieve them at a later time. Although you can use a global variable to temporarily store a value while the custom program remains in memory, global variables do not persist across multiple sessions. Using the AutoCAD® Object library and VBA, you can store values so that they persist between drawing or AutoCAD sessions.

If you want a value to be available when a drawing is open, you can use extended data (Xdata) or a custom dictionary. (I introduced the use of dictionaries in Chapter 29, “Annotating Objects,” and how they are ...

Get AutoCAD Platform Customization: User Interface, AutoLISP, VBA, and Beyond now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.