Archicad C++ API
About Archicad add-on development using the C++ API.

disable Window Insertion on inner side of wall

Martin Walter

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?

AC23, Windows 10, i7-6700HQ, 8Gb RAM, 500Gb SSD

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.

Akos Somorjai

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.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!