Deletes an attribute.
GSErrCode ACAPI_Attribute_Delete ( const API_Attr_Head* attrHead );
- [in] The
indexfields in the header identifies the attribute to delete.
- The function has completed with success.
- The passed parameter
- You tried to delete pens, fonts, a solid or an empty fill, or an attribute with index 1.
- The attribute is out of the users workspace.
For other common API errors see the API Errors document.
This function is used to delete an attribute, defined by the
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.
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.
API_Attribute attrib; BNZeroMemory (&attrib, sizeof (API_Attribute)); attrib.header.typeID = API_LinetypeID; attrib.header.index = 5; GSErrCode err = ACAPI_Attribute_Delete (&attrib.header);
- Version: API 1.3 or later
- Header: ACAPinc.h