2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations
2022-02-08 03:45 PM
I am creating custom windows with my AddOn.
Actually I am using the following code to get the click-point of the user on a wall:
ClickAnElem(sClickWall.ToCStr().Get(), API_WallID, nullptr, API_WindowID, &wallGuid, &coord3D);
The problem is that the resulting insertion tool allowes the user the insert the window on the inner and the outer side of the wall:
Is there a possibility to only allow windows to be set on the outer side of the wall?
2022-02-10 02:41 PM
Cannot be done, You can "bypass" the "opening direction" (refer to niche object as an example), but not this, however I have windows that sense the core (a lintel) and is put there in correct position.
2022-02-11 08:01 PM
No, not directly. Although there is a filtering mechanism (see SetFilterForInput
in Interface_Functions.cpp), but it is not suitable for this situation.
You can reject the input after getting the coordinate from the user (hint: API_GetPointType
contains the guid of the clicked element), and keep asking for input when the user clicks an invalid point.
You may also set the pointInfo.prompt
message (it appears in the status bar at the bottom) to inform the user about what kind of input you are expecting.