Extracting and Displaying Static Property Type Information

COM wrappers for native and custom AutoCAD entities, as well as non-AutoCAD objects, must implement the IDispatch ActiveX Automation interface in order to appear in the Property Inspector grid. The Property Inspector uses an entity's IDispatch methods to get and set static property data. To determine which static properties are available for an object, the Property Inspector calls IDispatch::GetTypeInfo(). This function is automatically implemented in AutoCAD COM wrappers. It returns an ITypeInfo data structure that describes the object's methods and properties as defined in its type library.

The Property Inspector uses this property information to construct the appropriate property editing controls. For example, if a property's type is numeric or textual, it constructs an edit box. If it is an enum, it creates a combo box with the enumerated value list. If it is a stock property such as color, layer, linetype, lineweight, or other built-in property, it constructs a standard drop-down list similar to the corresponding control in AutoCAD's Object Property toolbar.