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

GDL
About building parametric objects with GDL.
SOLVED!

Cant changer surface

Anonymous
Not applicable
Hi

I have som objects that have been made of morphs, and some has been importer as RFA objects, and converted to morph. When im saving them after morph, im saving them as MEP PARTS.
The problem is, i cant change the surface where i want it to.

If you look on the attached image, i want to change the surafe there, at number 1, but when i do, nothing is happening. But at number 2, i can change it, but i dont want to change it there. Where can this be fixed?
16 REPLIES 16
A_ Smith
Expert
If you can't post the object, it's hard to tell what is wrong. I can only suggest you do as Ling said. If the object is made of one type of material you could manually comment each material statement in 3D sript - press Ctrl+F (windows OS) and replace "material" with "!material" - apply to all. Now all materials are ignored. All that is left to write new material statement with the new_material_variable at the beginning of 3D Script - [SET] MATERIAL name_or_index. You have to create this new_material_variable in Parameters, not Parameter Script.
AC 22, 24 | Win 10
Anonymous
Not applicable
Hi

I can post the object.

You can download it from here

https://we.tl/t-7UlgQhBpry
Solution
Barry Kelly
Moderator
You will need to open the object and edit the 3D script.

Search for all of the lines that say .... material "Plastic - White"
There are more than I show in the image.

This is hard coding the material to Plastic - White.

Replace the line with ... material MainBoxMaterial

This will now use the material parameter that you want - make sure you don't use quotes.

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
Anonymous
Not applicable
Hi

This was working wery well on some of the objects.
So thank you so much

But i have some objects its not working on.

Could you mayhbe take a look at that as well?

https://we.tl/t-V1C9bEVkMP
Anonymous
Not applicable
I know that i need to change the material name, but when i do that same process, i can only change surface on the little dot in the middle, and i want to change it all
A_ Smith
Expert
Well, you should look through the whole 3D script for material statements. Here there are several of them - for different materials - variables bms_1 and bms_168, and ordinary materials - "Maling - 01 Matt" and "Maling - 01 Blank".
that's why you need to add after requests bms_1=MainBoxMaterial and bms_168=MainBoxMaterial and replace those materials as you did before
AC 22, 24 | Win 10
Anonymous
Not applicable
Thank you so much everyone. Its what i wanted now