GDL
About building parametric objects with GDL.

GDL DEFINE MATERIAL using Surfaces

GDL Enthusiast
Enthusiast

Hi, 

 

Is there a way to extract the parameters of a Surface/Texture from Archicad into GDL? My hope is one can see the parameters, somehow, of a surface texture and copy that detail to GDL code. It would enable a few more material definitions.

 

An example of the standard Define Material using RGB:

DEFINE MATERIAL "anodiseframe" 4, 0.84, 0.83, 0.85

 

It is a slow, hit and miss method to create materials especially when using the full Define Material categories. My hope was to use the Archicad Surfaces tool to create the right material first time in GDL.

 

Many thanks, Matt

1 ACCEPTED SOLUTION
5 REPLIES 5
Barry Kelly
Moderator

Why do you want to define a surface material that already exists?

Isn't that just doubling up and asking for trouble.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Hi Barry, 

 

I sometimes send GDL objects to my colleagues on different systems. There is a common file of materials, however sometimes people tweek and duplicate materials  😏

 

By having a predefined list in GDL of the three or four materials needed by the GDL code, that makes the materials consistent and steady for future use by colleagues.

 

I have read about a hidden menu 60 that provides parameters but I can't seem to activate it in Windows. There may be a better way?

 

Many thanks, Matt

I think it´s a good idea to define materials in GDL. When You use the same object in diferent projects for years, the object looks the same. Especially simple material definitions without textures and bitmaps are very feasible. 

- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.
Solution

On Library Developer toolbar check Library Developer / Enable Saving a Surface as GSM. Then there will be a Save as GSM button in the Attributes / Surfaces dialog.

Pre-AC27 this command has to be added manually to a menu in the work environment.

 

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

Hi Peter,

 

Thank you that fit the bill perfectly! I have never seen so much code to define a material until I opened a material file, wow, that is something. Hugely appreciate your help in finding the menu. Many thanks Matt

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!