Changes the parameters of a number of elements.
GSErrCode ACAPI_Element_ChangeParameters ( const GS::Array<API_Guid>& elemGuids, const API_Element* defPars, const API_ElementMemo* defMemo, const API_Element* mask );
- [in] Identifies the element(s).
- [in] The parameters of the new element.
- [in] The memo of the new element. (Only if needed.)
- [in] The mask of the new element.
- The function has completed with success.
- The current database is not proper for the operation
- Not enough memory to complete the operation
For other common API errors see the API Errors document.
You can use this function to change the settings parameters of a number of elements, identified by
empty, then this function works on the selection. Only those elements are affected whose type is the same that passed in the
Elements which are not allowed for edit for some reason, are ignored. Such cases can be:
- it is locked,
- it is on a locked layer,
- it is part of a group, and suspend group is OFF
- it is not in the users workspace, etc.
This function can only be used to change the settings-type parameters of elements, but not their geometric parameters. Only those parameters are affected which are marked in the
mask argument. Such elements which refer to Library Parts, the
params handle from the
memo is interpreted. If it is
nullptr, nothing will happen. If it is passed, the actual parameter list will be changed.
The following notes are absolutely important:
- the list of target elements will be automatically extended by the other group members; if there are a group member in the set, and suspend group is OFF
- all the edited elements keep their unique ID
- all the inter-element links will be adjusted; including dimensioning also,
Do not forget to call ACAPI_DisposeElemMemoHdls to dispose of the handles when you’re finished.
- Version: API 2.1 or later
- Header: ACAPinc.h