Retrieves the specified property definitions with values.
GSErrCode ACAPI_Element_GetPropertyValues ( const API_Guid& elemGuid, const GS::Array<API_PropertyDefinition>& propertyDefinitions, GS::Array<API_Property>& properties );
Parameters
- elemGuid
- [in] The element GUID to search for.
- propertyDefinitions
- [in] The property definitions to get the values for. They are identified through
definition.guid.
- properties
- [out] The definitions and values of the requested properties.
Return Values
NoError
- The function has completed with success.
APIERR_BADID
- The elemGuid did not refer to a valid element.
For other common API errors see the API Errors document.
Example
For more detailed examples, please see the Property_Test add-on.GSErrCode GetAllPropertyValues (const API_Guid& elemGuid, GS::Array<API_PropertyValue>& values) { GS::Array<API_PropertyDefinition> definitions; GSErrCode error = ACAPI_Element_GetPropertyDefinitions (elemGuid, API_PropertyDefinitionFilter_UserDefined, definitions); if (error == NoError) { GS::Array<API_Property> properties; error = ACAPI_Element_GetPropertyValues (elemGuid, definitions, properties); if (error == NoError) { for (UInt32 i = 0; i < properties.GetSize (); i++) { if (properties[i].isDefault) { values.Push (properties[i].definition.defaultValue); } else { values.Push (properties[i].value); } } } } return error; }
Requirements
- Version: API 22 or later
- Header: ACAPinc.h