Retrieves extended information for an attribute.
GSErrCode ACAPI_Attribute_GetDef ( API_AttrTypeID typeID, API_AttributeIndex index, API_AttributeDef* defs );
Parameters
- typeID
- [in] Type of the attribute.
- index
- [in] Index of the attribute.
- defs
- [out] The extended information for an attribute.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
- The passed parameter
(defs)
isnullptr
APIERR_BADID
- The attribute type is invalid; see Remarks
APIERR_BADINDEX
- The attribute index is invalid
APIERR_DELETED
- The attribute doesn’t exist in the database.
For other common API errors see the API Errors document.
Remarks
This function is used to return detailed information on the specified attribute.
This function is available only for lines, fills, composites, layers, and zone categories. Other type of attributes do not have extended information; all of the their data can be passed through the API_Attribute structure. See the ACAPI_Attribute_Get function to get the base parameters of an attribute.
Do not forget to dispose the returned data handles if they are not needed any more. Use the ACAPI_DisposeAttrDefsHdls function for this purpose.
Example
API_Attribute attrib; API_AttributeDefs defs; GSErrCode err; /* retrieve all information for the "Wave" linetype */ BNZeroMemory (&attrib, sizeof (API_Attribute)); BNZeroMemory (&defs, sizeof (API_AttributeDefs)); attrib.header.typeID = API_LinetypeID; CHCopyC ("Wave", attrib.header.name); err = ACAPI_Attribute_Get (&attrib); if (err == NoError) err = ACAPI_Attribute_GetDef (attrib.header.typeID, attrib.header.index, &defs); ACAPI_DisposeAttrDefsHdls (&defs);
Requirements
- Version: API 1.3 or later
- Header: ACAPinc.h
See Also
API_AttrTypeID, API_Attribute, API_AttributeDef, API_AttributeIndex,
ACAPI_Attribute_Get, ACAPI_DisposeAttrDefsHdls,
Attribute Manager, API Functions