We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.

How can I get an override material for the wall?

LeeJaeYoung
Virtuoso

I'm trying to get the override material for the wall from window & door.
How can I get an override material for the wall?

 

스크린샷 2023-11-01 200046.png

AC27 on window 11
13 REPLIES 13

I don't think you can tell if that button is pressed or not.

It just affects what is the surface material used.

 

When it is off, the surface material (WALL_MAT_A etc.) comes from the wall composite.

When it is on, it is what ever you have set the override material to be.

 

Even WALL_SKINS_PARAMS [skin_number][19] will report the wall surface or the override surface if it is set.

 

But you never know if the override has been set or not.

It just gives you the surface material currently being used.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Lingwisyer
Guru

You could possibly query gs_bmat_surface with the Builind_Material_info REQUEST then compare that to the WALL_SKINS_PARAMS return. If they are different, then the surface override is toggled on. If they are the same, then the toggle is either off or the selected surface is the same as the Building Material.

 

Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660

Hi,

 

GDL doesn't know about the state of this button. WALL_MAT_A/B always contains the result of the settings, what is seen on the model.

 

WALL_FLIPPED doesn't work in 3d, and WALL_MAT_A/B behaves differently in 3d than 2d regarding flipping, while WALL_SKINS_PARAMS[][19] is the same in 2d-3d.

Try this:

addz -0.3
material WALL_MAT_B
block .2,.2,.2

addz 0.6
material WALL_MAT_A
block .2,.2,.2

The coordinate system and the global variables are always set in a way that you don't need to care about a flipped wall, or how the opening was placed in 3D.

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

Thank you to peter baksa and lingwisyer.
I will study more and ask questions.

My thoughts were short and I thought it was changed by the button, but on the contrary, it turns out that the result is obtained by comparing.

AC27 on window 11