Find the next step in your career as a Graphisoft Certified BIM Manager!

GDL
About building parametric objects with GDL.

Inline Attributes

runxel
Legend
Is there any way, how to have inline attributes not polluting the project?
The manual has a cryptic phrasing (as always), so I can't figure out, what's up with that.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
7 REPLIES 7
Barry Kelly
Moderator
By in-line do you mean those automatically generated by GDL scripts?
The only way to stop those that I know of is to track down the GDL script (Master_GDL), remove/edit it and then remove the attributes.


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
runxel
Legend
Hi Barry,
inline Attributes are those that can be "DEFINE"-d in the script and in my case it's not auto, but deliberately done by myself.

It's a common misconception that these attributes are only set inside a MASTER_GDL. In fact to quote the manual:
Attribute definition in library parts. The materials and textures defined this way can be used in the script and its second generation scripts. Fills and line types defined and used in the master or 2D script have the same behavior as if they were defined in the MASTER_GDL script, but only if used by name or index (not through a parameter).
So in my case I have a fill defined but I think it is bad style to have it pollute the project's attribute list.

It would be great if there is a solution for this.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Barry Kelly
Moderator
Not 100% sure, but attributes defined in a MASTER_GDL will actually be added to the attributes as a permanent attribute (until you delete the attribute and the MASTER-GDL that makes it).

Those defined in an object are only available to that object (and its parent objects if it is a CALLed macro)?
They are not actually an attribute available to other objects or the main file?
I may be wrong about that.
If I am wrong about that then still the only way to remove them is to edit your objects and delete the definition.


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
runxel
Legend
Yes, sadly you're wrong about that.
Doesn't matter if MASTER_GDL or not, e.g. defining a fill will result in having that attribute mirrored to the project, as visualised by the dreaded italic text.

What put me off was the wording in the manual. So it kinda looks like you can somehow define an attribute to be truly inline. My questions aims at if and how this is the case.
Otherwise this is rather silly. Why would you need a MASTER_GDL if just defining inside the script has the same effect.

Maybe someone from GS can enlighten us here.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Barry Kelly
Moderator
I just defined a fill in an object and yes, it does add as an attribute as well.
But not until you place that object in the model.
If you don't place the object you don't get the attribute.
Where as the Master_GDL adds the attribute as soon as you re-load the library (not need to place any objects).

Delete the object and the new attributes stay.
Even after saving, closing and re-opening the file.
It is now an attribute (and has the underline when looking in the Attribute Manager).


I think what the quote from the manual is saying, is that if you define a fill in an object, you can not use it (I think it should say "should not use it") as a parameter - because it doesn't exist until you place the object.
Once you place the object it creates the attribute, and then you will be able to see it as a parameter, but in that file only.
It won't exist in a new file until you place the object.

Where as in the Master_GDL, it is created when the library is loaded, so is available straight away as a parameter.


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
runxel
Legend
Okay, now this cryptic wording begins to make sense. A bit, at least.

That being said, it's a shame we can't properly have "real" inline attributes. Sometimes you just need to have the ability in that specific object to have attributes that you don't need anywhere else....

In other news: I made a wish.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

@Barry Kelly wrote:
I just defined a fill in an object and yes, it does add as an attribute as well.
But not until you place that object in the model.
If you don't place the object you don't get the attribute.
Where as the Master_GDL adds the attribute as soon as you re-load the library (not need to place any objects).


This problem has just reared it ugly head for me again.

As I said before, the in-line attribute defined in an object, was not added to a file unless you placed that object.

 

That was true in version 22.

My office has just made the jump from 22 to 25.

 

In 25, that object just has to be in your loaded library and it will add to the attributes.

Great, because as we have been converting our old jobs to 25, some of the fills are getting messed up.

 

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