ACAPI_​Attribute_​GetPropertyValues

Retrieves the property values of the property definitions.

    GSErrCode  ACAPI_Attribute_GetPropertyValues (
        const API_Attr_Head&                   attrHead,
        GS::Array<API_PropertyDefinition>&     propertyDefinitions
        GS::Array<API_Property&                properties
    );

 

Parameters

attrHead
[in] Header of the attribute. The attribute is identified by typeID and index
propertyDefinitions
[in] List of property definitions.
properties
[out] List of property values.

 

Return Values

NoError
The function has completed with success.
APIERR_BADINDEX
APIERR_DELETED
The attrHead did not refer to a valid attribute.
APIERR_GENERAL
Every other case.

For other common API errors see the API Errors document.

 

Example


GSErrCode GetPropertyDefinitionNames (API_AttrTypeID attributeTypeID, short attributeIndex, GS::Array<GS::UniString>& names)
{
    API_Attr_Head                     attributeHeader;
    GS::Array<API_PropertyDefinition> definitions;
	
    BNZeroMemory (&attributeHeader, sizeof (API_Attr_Head));
    attributeHeader.typeID = attributeTypeID;
    attributeHeader.index = attributeIndex;
	
    GSErrCode error = ACAPI_Attribute_GetPropertyDefinitions (attributeHeader, definitions);
    if (error == NoError) {
        GS::Array<API_Property> properties;
        error = ACAPI_Attribute_GetPropertyValues (attributeHeader, definitions, properties);
        }
    }

    return error;
}

        
For more detailed examples, please see the Property_Test add-on.

 

Requirements

Version:API 23 or later
Header: ACAPinc.h

 

See Also

Properties,
API Functions