Retrieves the values of the specified property definitions.
GSErrCode ACAPI_Element_GetPropertyValuesOfDefaultElemByGuid ( const API_ElemType& type, const GS::Array<API_Guid>& propertyDefinitionGuids, GS::Array<API_Property>& properties );
Parameters
- type
- [in] Type of the default element.
- propertyDefinitionGuids
- [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
- Incorrect
type
was specified.
For other common API errors see the API Errors document.
Remarks
From version 26 the typeID and variationID parameters were merged into a single API_ElemType parameter.
Example
For more detailed examples, please see the Property_Test add-on.GSErrCode GetAllPropertyValuesByGuid (const API_ElemType& type, GS::Array<API_PropertyValue>& values) { GS::Array<API_PropertyDefinition> definitions; GSErrCode error = ACAPI_Element_GetPropertyDefinitionsDefault (type, definitions); if (error == NoError) { GS::Array<API_Guid> propGuids; for (UInt32 i = 0; i < definitions.GetSize (); i++) { propGuids.Push (definitions[i].guid); } GS::Array<API_Property> properties; error = ACAPI_Element_GetPropertyValuesOfDefaultElemByGuid (type, propGuids, 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