Retrieves the specified property definitions (defined by their GUIDs) with values from the component.
GSErrCode ACAPI_ElemComponent_GetPropertyValuesByGuid ( const API_ElemComponentID& elemComponent, const GS::Array<API_Guid>& propertyDefinitions, GS::Array<API_Property>& properties );
Parameters
- elemComponent
- [in] The identifier of the element’s component to search for.
- propertyDefinitions
- [in] The property definition GUIDs to get the values for.
- properties
- [out] The definitions and values of the requested properties.
Return Values
NoError
- The function has completed with success.
APIERR_BADID
- The elemComponent did not refer to a valid element.
For other common API errors see the API Errors document.
Example
GSErrCode GetAllPropertyValues (const API_ElemComponentID& elemComponent, GS::Array<API_PropertyValue>& values) { GS::Array<API_PropertyDefinition> definitions; GSErrCode error = ACAPI_ElemComponent_GetPropertyDefinitions (elemComponent, API_PropertyDefinitionFilter_UserDefined, definitions); if (error == NoError) { GS::Array<API_Guid> propertyDefinitionGuids; for (UInt32 i = 0; i < definitions.GetSize (); i++) { propertyDefinitionGuids.Push (definitions[i].guid); } GS::Array<API_Property> properties; error = ACAPI_ElemComponent_GetPropertyValuesByGuid (elemComponent, propertyDefinitionGuids, properties); if (error == NoError) { for (UInt32 i = 0; i < properties.GetSize (); i++) { if (properties[i].isDefault) { values.Push (properties[i].definition.defaultValue.basicValue); } else { values.Push (properties[i].value); } } } } return error; }
Requirements
- Version: API 25 or later
- Header: ACAPinc.h