ACAPI_​Element_​IsPropertyDefinitionValueEditable

Tells whether the value of the property can be modified for the specified element. If the elemGuid argument is APINULLGuid, it tells whether the property definition’s default value is editable.

    bool  ACAPI_Element_IsPropertyDefinitionValueEditable (
        const API_Guid&     elemGuid,
        const API_Guid&     propertyGuid
    );

 

Parameters

elemGuid
[in] The element GUID to search for. It can be APINULLGuid, in this case the property definition’s default value is checked.
propertyGuid
[in] The property definition GUID to search for.

 

Return Values

true
The value of the property, or the property definition’s default value can be modified.
false
The value of the property, or the property definition’s default value can not be modified. For example, it is a read-only property, or a User Defined property with expression, which has cyclic property references.

Example


GSErrCode GetEditablePropertyDefinitions (const API_Guid& elemGuid, GS::Array<API_PropertyDefinition>& editableProperties)
{
	GS::Array<API_PropertyDefinition> definitions;
	GSErrCode error = ACAPI_Element_GetPropertyDefinitions (elemGuid, API_PropertyDefinitionFilter_UserDefined, definitions);
	if (error == NoError) {
		for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
			if (ACAPI_Element_IsPropertyDefinitionValueEditable (elemGuid, definitions[i].guid)) {
				editableProperties.Push (definitions[i]);
			}
		}
	}
	return error;
}
        

 

Requirements

Version: API 22 or later
Header: ACAPinc.h

 

See Also

Properties,
API Functions