Retrieves the specified property definition’s value from the element.
GSErrCode ACAPI_Element_GetPropertyValue ( const API_Guid& elemGuid, const API_Guid& propertyDefinitionGuid, API_Property& property );
Parameters
- elemGuid
- [in] The element GUID to search for.
- propertyDefinitionGuid
- [in] The property definition to get the values for.
- property
- [out] The value of the requested property.
Return Values
NoError
- The function has completed with success.
APIERR_BADID
- The elemGuid did not refer to a valid element.
APIERR_GENERAL
- The propertyDefinitionGuid did not refer to a valid property definition.
For other common API errors see the API Errors document.
Example
For more detailed examples, please see the Property_Test add-on.GSErrCode GetPropertyValue (const API_Guid& elemGuid, API_PropertyValue& value) { GS::Array<API_PropertyDefinition> definitions; GSErrCode error = ACAPI_Element_GetPropertyDefinitions (elemGuid, API_PropertyDefinitionFilter_UserDefined, definitions); if (error == NoError) { API_Property property = {}; error = ACAPI_Element_GetPropertyValue (elemGuid, definitions[0].guid, property); if (error == NoError) { value = property; } } return error; }
Requirements
- Version: API 22 or later
- Header: ACAPinc.h