We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-12-19 07:22 PM - last edited on 2024-09-17 12:42 PM by Doreena Deng
How to hide or show the ESC layer as shown in the image below
2023-12-21 02:46 PM
Hi Linh,
You have to change the bit of APILay_Hidden in the attr.header.flags attribute to get the desired result.
If you always want to show or hide the layer then use the proper branch of the commented solution.
GS::UniString attrName = *attr.header.uniStringNamePtr;
if (attrName == "Structural - Bearing") {
/* change the bit to the opposite in case if you need a one-way solution
const bool isHiddenLayer = attr.header.flags & APILay_Hidden;
if (isHiddenLayer) {
attr.header.flags &= ~APILay_Hidden;
} else {
attr.header.flags |= APILay_Hidden;
}
*/
// change the bit to the opposite in one line
attr.header.flags ^= APILay_Hidden;
ACAPI_Attribute_Modify (&attr, nullptr);
}
Kind Regards,
Ákos