Archicad 28 C++ API
|
Functions related to selection and marquee, including selecting elements and listing selected elements or elements included in the marquee. More...
Classes | |
struct | API_SelectionInfo |
Information about the current selection. More... | |
struct | API_MarqueeFilter |
Defines the filter for 3D filter and cut settings. More... | |
Typedefs | |
typedef GSErrCode | APISelectionChangeHandlerProc(const API_Neig *selElemNeig) |
User supplied callback procedure for handling selection changes. | |
Enumerations | |
enum | API_SelTypeID { API_SelEmpty = 0 , API_SelElems , API_MarqueePoly , API_MarqueeHorBox , API_MarqueeRotBox } |
Types of the selection. More... | |
enum | API_SelRelativePosID { API_InsidePartially = 0 , API_InsideEntirely , API_OutsidePartially , API_OutsideEntirely } |
Types of the relative position to marquee criteria. More... | |
Functions | |
GSErrCode | ACAPI_Selection_GetSelectedElement (const API_Neig *apiNeig, API_Guid *apiGuid) |
Converts an API_Neig structure to an API_Guid. | |
GSErrCode | ACAPI_Selection_SetSelectedElementNeig (const API_Guid *apiGuid, API_Neig *apiNeig) |
Converts an API_Guid structure to an API_Neig. | |
GSErrCode | ACAPI_Selection_Select (const GS::Array< API_Neig > &selNeigs, bool add) |
Adds/removes a number of elements to/from the current selection. | |
GSErrCode | ACAPI_Selection_DeselectAll () |
Adds/removes a number of elements to/from the current selection. | |
GSErrCode | ACAPI_Selection_Get (API_SelectionInfo *selectionInfo, GS::Array< API_Neig > *selNeigs, bool onlyEditable, bool ignorePartialSelection=true, API_SelRelativePosID relativePosToMarquee=API_InsidePartially) |
Returns information on the selection, and the selected elements. | |
GSErrCode | ACAPI_Selection_SetMarquee (API_SelectionInfo *selectionInfo) |
Changes the current marquee selection. | |
GSErrCode | ACAPI_Notification_CatchSelectionChange (APISelectionChangeHandlerProc *handlerProc) |
Turns the monitoring of selection changes on/off. | |
Functions related to selection and marquee, including selecting elements and listing selected elements or elements included in the marquee.
typedef GSErrCode APISelectionChangeHandlerProc(const API_Neig *selElemNeig) |
User supplied callback procedure for handling selection changes.
selElemNeig | [in] This structure identifies the last selected element. |
enum API_SelRelativePosID |
Types of the relative position to marquee criteria.
enum API_SelTypeID |
Types of the selection.
API_SelEmpty
identifier means that no selection is actually used in Archicad. The API_SelElems
identifier corresponds to the first method when elements are individually selected. Other values identify that the selection is done by some kind of marquee shape. GSErrCode ACAPI_Notification_CatchSelectionChange | ( | APISelectionChangeHandlerProc * | handlerProc | ) |
Turns the monitoring of selection changes on/off.
handlerProc | [in] The callback procedure to call when notifications are sent out on changes in the selection. Specifying nullptr here means you don't need the notifications any more. |
GSErrCode ACAPI_Selection_DeselectAll | ( | ) |
Adds/removes a number of elements to/from the current selection.
GSErrCode ACAPI_Selection_Get | ( | API_SelectionInfo * | selectionInfo, |
GS::Array< API_Neig > * | selNeigs, | ||
bool | onlyEditable, | ||
bool | ignorePartialSelection = true , |
||
API_SelRelativePosID | relativePosToMarquee = API_InsidePartially |
||
) |
Returns information on the selection, and the selected elements.
selectionInfo | [out] The parameters of the current selection. The typeID field of the selectionInfo gives the selection type. |
selNeigs | [out] An array containing the GUIDs of the selected elements. Can be nullptr if you are interested in the selection information only. |
onlyEditable | [in] Tells whether you are interested in editable elements only. |
ignorePartialSelection | [in] Retrieves also partial element selection information or the element itself only selected as whole (for legacy compatibility reasons, the default value of this parameter is true, meaning partial selection is ignored). This parameter is ignored in case of marquee based selection. |
relativePosToMarquee | [in] Retrieves elements relative to marquee (for legacy compatibility reasons, the default value of this parameter is API_InsidePartially , meaning only those elements will be returned which have an intersection with the marquee area). This parameter is ignored in case of individually selected elements. |
API_SelElems
identifier is returned. The number of the selected and selected and editable elements are also returned. In case of marquee based selection, the function gives back the actual polygon of the current selection in the API_SelectionInfo structure; don't forget to dispose this handle. The API_SelEmpty
identifier in the typeID field of the selectionInfo parameter means that no selection is actually used in Archicad. In case of individually selected elements, Archicad returns all the elements which are selected. In the case of marquee based selection, only those will be returned which match the position criteria defined by relativePosToMarquee. GSErrCode ACAPI_Selection_Select | ( | const GS::Array< API_Neig > & | selNeigs, |
bool | add | ||
) |
Adds/removes a number of elements to/from the current selection.
selNeigs | [in] The elements to be added/removed (array of API_Neig objects); |
add | [in] If true, adds the elements to the current selection, otherwise removes them from the selection. |
elemPartType
and elemPartIndex
fields of API_Neig. GSErrCode ACAPI_Selection_SetMarquee | ( | API_SelectionInfo * | selectionInfo | ) |
Changes the current marquee selection.
selectionInfo | [in] The parameters of the marquee to be set. |
API_MarqueePoly
, API_MarqueeHorBox
or API_MarqueeRotBox
in order to set a new marquee outline, otherwise the actual marquee will be removed. The function has no effect on the individual selection of elements. In case of API_MarqueePoly
type marquee do not forget to release the coordinate handle passed in the selectionInfo parameter.