Dynamic Properties

Static type information is defined at compile time in IDL files. Because of this, it cannot be modified easily at runtime. Microsoft provides interfaces, notably ITypeInfo2 and ICreateTypeInfo, that allow applications to perform runtime examinations of type information. However, these interfaces allow you to discover type information only from an existing ITypeInfo structure that refers to an existing dispatch interface. There is no runtime method for interrogating an object for its property information.

With the Property Inspector API's dynamic property interfaces, applications can supply dynamic properties for any native or custom class at runtime. These runtime properties are discovered or generated through a runtime query of the object's associated property sources. The application that defines the dynamic properties decides whether to store the dynamic properties in the drawing. When the defining application is unloaded, or when the drawing session ends, runtime properties may or may not be discarded, depending on whether they are stored as DWG data.

Dynamic properties are most commonly provided for drawing entities and objects. However, they can also be provided for native or custom AutoCAD commands, as well as for COM objects that are external to AutoCAD.