AcMapObjClassProperty::SetValue Method

Land Desktop Development ARX CPP SDK

AcMapObjClassProperty:: SetValue Method
 

Sets the value of this property for the specified entity. The entity and property can be classified or unclassified. If this property is classified, this function checks the property's range of valid values and, if the value is invalid, sets the value to its default value if bFixOutOfRangeIfClassified is true. Properties retrieved with AcMapClassificationManager::GetClassifiedProperties() (twoforms) are classified properties. Properties retrieved with AcMapClassificationManager::GetProperties() (twoforms) are unclassified properties, and SetValue() sets property values regardless of the value of bFixOutOfRangeIfClassified.

AcMapObjClass::EErrCode SetValue(
    const AcDbObjectId& entId, 
    const VARIANT * pvarValue, 
    bool bFixOutOfRangeIfClassified
);
Parameters 
Description 
entId 
Input object ID of the entity whose property value to set.  
pvarValue 
Input value to set the property to.  
bFixOutOfRangeIfClassified 
Input true to reset an out-of-range classified-property value to its default value, or false not to reset it.  
Returns

Returns AcMapObjClass::EErrCode eOk if successful. Returns AcMapObjClass::EErrCode ePropertyNotFound if the entity does not have the specified property. Returns AcMapObjClass::EErrCode ePropertyReadOnly if the property is a read-only property, or if the property is classified and AcMapObjClassProperty::IsReadOnly() is true. Returns AcMapObjClass::EErrCode eOutOfRange if the property value is still out of range. This error code is returned only if bFixOutOfRangeIfClassified is true, the property is classified, and the out-of-range property value could not be reset. For example, if the range of the Layer property specifies a layer that does not exist in the current drawing, an attempt to fix this nonexistent layer will fail. Returns AcMapObjClass::EErrCode eFailed if the process failed for some other reason.

Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at [email protected].