cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Streamline your workflows and master BIM coordination! Program starts April 28!

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

please teach me that how to hide selected components.

nishida_jp
Booster

In ArchiCAD 27, right-clicking allows you to "hide selected components," but how can I achieve the same thing using the ArchiCAD 27 C++ API?

1 REPLY 1

An element is hidden by hiding the layer it's on:

- Retrieve the element's layer (API_LayerType) using ACAPI_Attribute_Get

- Layer visibility is a flag set in API_LayerType::head.flags

- Toggle off the flag APILay_Hidden to hide the layer

- Write the change back with ACAPI_Attribute_Modify

 

For an example, look at the example project "Attribute_Test" (in the API Examples), specifically the function Do_HideLayerOfLines

Ralph Wessel BArch
Central Innovation