ACAPI_​Attribute_​Delete

Deletes an attribute.

    GSErrCode  ACAPI_Attribute_Delete (
        const API_Attr_Head&     attrHead
    );

 

Parameters

attrHead
[in] The typeID and index fields in the header identifies the attribute to delete.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
The passed parameter (attrHead) is invalid.
APIERR_REFUSEDPAR
You tried to delete pens, fonts, a solid or an empty fill, or an attribute with index 1.
APIERR_NOTMINE
The attribute is out of the users workspace.

For other common API errors see the API Errors document.

 

Remarks

This function is used to delete an attribute, defined by the typeID and index field of the attribute header. Certain attributes in the database can not be deleted; see the return values.

Note, that deleting an attribute do not effect any changes in the element database; they will refer to an attribute which is missing. That is not a problem, the server applications work in the same way when an attribute is deleted from the menus. The only exception is the layer attribute. Once a layer is deleted all the elements will be deleted; no matter in which database they are. The floor plan and all the section/elevations will be scanned to delete the elements which are on the given layer.

API 11  You can delete more than one attribute of the same type with the ACAPI_Attribute_DeleteMore function.

This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.

 

Example


API_Attribute attrib = {};
attrib.header.typeID = API_LinetypeID;
attrib.header.index = 5;

GSErrCode err = ACAPI_Attribute_Delete (attrib.header);

 

Requirements

Version: API 1.3 or later
Header: ACAPinc.h

 

See Also

API_Attr_Head
ACAPI_Attribute_DeleteMore
Attribute Manager
API Functions