Share

IPropertyManager Class

Class Hierarchy

IPropertyManager

C++

class IPropertyManager : public IUnknown;

File

dynprops.h

Description

This is the main property manager class. Use this to add your property classes for a given type of entity. You can get this interface using

GET_AUTOMATION_PROTOCOL(pEnt)->GetPropertyManager()

For each AcRxClass object in AutoCAD, the client can get a pointer to an object that implements IPropertyManager. This is handled internally via a protocol extension. Once the client has the property manager for the AcRxClass they are interested in, they may add their property classes to it via IPropertyManager::AddProperty. This will typically be done when your component loads, although you can add and remove properties at any time. When the user picks an object of that class, the Properties window code will get the property manager for that class, enumerate all the property classes, and interrogate those classes for their property information, which it will then display along with that object's static properties. Note that the IDynamicProperty class makes no assumptions about where the property data is stored. It simply requires the IDynamicProperty implementer to provide it when GetCurrentValueData is called. Similarly, when the user changes a dynamic property, the Properties window code will call SetCurrentValueData with the new value, leaving it up to the implementer to decide how to set that value. This leaves it up to the developer to decide how to persist dynamic property data.

The Properties window uses IPropertyManager and IDynamicProperty not only for properties of objects, but also for displaying properties of the current space when no object is selected. For example, when no object is selected in the drawing, the Properties window needs to display properties relating to the UCS. Also, certain commands require the Properties window to display property information, for example, the ORBIT commands. These situations require defining special property managers for these specific "modes". Getting the property managers for the modes requires a slightly different mechanism than the procedure for getting the property managers for selectable objects. As mentioned earlier, for properties of objects, there is a protocol extension for each class of object that the developer can use to get the property manager and add their property classes to. For modal situations, there will be a set of predefined protocol extensions on the database that the developer can use to retrieve the property manager for that modal situation.

Links

Methods

See Also

IDynamicProperty

Was this information helpful?