Transforms a set of elements.
GSErrCode ACAPI_Element_Edit ( GS::Array<API_Neig>* elemNeigs, const API_EditPars& pars );
- [in-out] An Array of API_Neig objects which enables you to work not only on an element as a whole, but on its internal parts too.
- [in] The details of the editing operation.
- The function has completed with success.
- The current database is not proper for the operation.
- The element guid is invalid.
- The element does not exist in the database
- Not enough memory to complete the operation
- The edit parameters are incorrect.
For other common API errors see the API Errors document.
This function transforms a set of elements with the parameters passed in the API_EditPars structure. These parameters identify both the operation code (drag, rotate, mirror…) and the transformation parameters.
nullptr or empty, then this function works on the selection; otherwise the set of elements passed will be the target.
What elements are transformed in the last case? The
elemNeigs array is an API_Neig list which enables you to work on not just a whole element, but on its internal parts as well. If you pass for example a neig to a slab hole, only the given hole will be transformed, without touching the base contour of the element.
Elements which cannot be edited for some reason are ignored. Such causes can be:
- it is locked,
- it is on a locked layer,
- it is part of a group, and suspend groups is OFF
- it is not in the users workspace, etc.
The following notes are absolutely important:
- the list of target elements will be automatically extended with the other group members; if there is a group member in the set and suspend groups is OFF
- all the edited elements keep their unique ID
- all the inter-element links will be adjusted; including dimensioning also
The new element’s GUID will be returned for each edited element in the
Note that this function is working on Section/Elevation databases also, which may have references to the plan database; they called virtual symbols identified by the
API_SectElemID element type. From Archicad 6.50 R2/V2 these elements can be edited directly in the section database, with the limitation that the section window must be the front window.
You can also change the geometry data of an element with the ACAPI_Element_Change function.
- Version: API 2.1 or later
- Header: ACAPinc.h