cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
LokiTrna
Newcomer

Hide or show a specific element by its GUID using the Archicad C++ API?

Hi everyone,

Is there a direct way to hide or show a specific element by its GUID using the Archicad C++ API?

Does a native function or an efficient workaround exist for this in the DevKit?

Thanks,

6 Replies 6
Ralph Wessel
Virtuoso

In general, the API can only echo the things a user can do. There is no direct way to hide an individual element that I'm aware of – only general mechanisms like hiding a layer (which might affect other elements). So I doubt there is any way to do this.

Ralph Wessel BArch
Central Innovation
Laszlo Nagy
Community Admin
Community Admin

I would amend this slightly: a user CAN hide selected element(s) in the 3D Viewpoint (but not in any other Viewpoint type). But I don't know if the API gives access to this feature or not.

Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac29

Hi LokiTrna,

 

In 3D you can use `ACAPI_View_ShowSelectionIn3D()`.
So first setup the selection to contain only the elements to show and then use this API function.

Or you could also use `ACAPI_UserInput_SetElementHighlight()` and set other elements to transparent.

 

Hope that helps,
Bernd

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com
Laszlo Nagy
Community Admin
Community Admin

If someone uses your second suggested method, will those elements still be there in the 3D Viewpoint, only invisible?

In that case, would surface/edge detection still work on them? Could they still be selected (even though they are invisible)?

Knowing these may help@LokiTrnadecide which method to use.

Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac29

Very good questions Laszlo!
Don't have time to try it out right now, but should be a relative easy test (maybe for @LokiTrna themselve to try).
Please report back whoever gives it a try 🙂

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com
Ralph Wessel
Virtuoso

No, the 3D model view is a temporary database built on demand. If you rebuild the view based on a selection it will only contain the selected elements.

Ralph Wessel BArch
Central Innovation

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!