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

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

GDL objects with adjustable materials

Anonymous
Not applicable
How do I create a GDL object where I can adjust the materials individually? The only way I know how to do it doesn't save the individual materials, and the only way to change material is to un-tic the "Use Object's Materials" box and choose a different material, but this changes the entire object.

Your help welcomed! Thanks!
12 REPLIES 12
MMontgomery
Enthusiast
In a nutshell, you define different materials while modeling, then change those definitions to a variable parameter in the GDL script.

*******

When you create your object, define a different material for each part of the object that you would like to be able to adjust individually.

For example, a chair with different materials for the legs, seat, and back. Assign Paint-01 to legs, Paint-02 to seat, and Paint-03 to back.

Save object as editable GDL object.

Place the object in your plan, select it, the open object using CTRL+SHIFT+O

Create a new material parameter for each item, in this case 3 of them. For this example, use the variables 'leg_mat', 'seat_mat' and 'back_mat' and choose a default material for each.

Then open the 3D script, use the 'search and replace text' command to replace "Paint-01" (include quotes since it is not a variable) with leg_mat (no quotes around variables), "Paint-02" with seat_mat and "Paint-03" with back_mat.

Hope that helps ~
AC 6-27 - Intel i9-9900K - RTX3090 - Windows 11 - 64GB RAM
Anonymous
Not applicable
I have written an article about this subject for ArchiMAG. You can download the entire article from my website for free.
vfrontiers
Advocate
That's how it's done... Just been doing a lot of this lately...

So... Let's make this a WISH...

We know that GS "blessed" us by using a SPECIAL command that turned any slab with an ID "WALLHOLE" into a WALLHOLE command for windows and doors...

Here, I am proposing something much the same...

1. GS to create some special character like asterisk at the beginning AND the end of a material name

*LegMat*

2. Users then create a Material Named *LegMat* in their materials library.

3. When used as the material for an element in a SAVE AS LIBRARY PART...AC would create that PARAMETER and assign it as a parameter to the objects gdl..

Sounds so simple when I write out...

GS?
Duane

Visual Frontiers

AC25 :|: AC26 :|: AC27
:|: Enscape3.4:|:TwinMotion

DellXPS 4.7ghz i7:|: 8gb GPU 1070ti / Alienware M18 Laptop
Laszlo Nagy
Community Admin
Community Admin
Hi Duane,
Can you make this wish into a separate Wish post where we can vote for it?
I am anxious to click the ESSENTIAL button.
Great idea. Might be extended to other attribute types.
Or, the element could be dimensioned before being saved as GDL and all dimensions would be converted into parameters. The Dimension Text would be changed to the intended GDL parameter name prior to saving.
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-Ac27
vfrontiers
Advocate
Done!

---now go vote!

http://archicad-talk.graphisoft.com/viewtopic.php?t=37083
Duane

Visual Frontiers

AC25 :|: AC26 :|: AC27
:|: Enscape3.4:|:TwinMotion

DellXPS 4.7ghz i7:|: 8gb GPU 1070ti / Alienware M18 Laptop
Laszlo Nagy
Community Admin
Community Admin
Done.
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-Ac27
vfrontiers
Advocate
And... you might as well vote here too....


http://archicad-talk.graphisoft.com/viewtopic.php?p=192471#192471
Duane

Visual Frontiers

AC25 :|: AC26 :|: AC27
:|: Enscape3.4:|:TwinMotion

DellXPS 4.7ghz i7:|: 8gb GPU 1070ti / Alienware M18 Laptop
Anonymous
Not applicable
Success! Thank you all for your help!
Anonymous
Not applicable
Can anybody tell me how i define materials in the master script???