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

GDL Possibilities

Is it possible to call an object with CALL command for example and then allow to modify one of the parameters of this object ?
Example : using "Rotation.gsm" to ajust e57 points cloud and allow to supplant plan display

Is it possible to call an element like object and if it's possible are we able to call an element other than by its name in the library?
Example : ROOM_NUMBER


Is it possible with GDL to call a parameter of an element or even to concatenate or add the results.
Example : ROOM_NET_AREA


I'm a GDL beginner, do not hesitate to tell me the smallest step.
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 13 Ventura - MacBook Pro M2 max- 32Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
8 REPLIES 8
runxel
Legend
Christophe wrote:
Is it possible to call an object with CALL command for example and then allow to modify one of the parameters of this object ?
Sure!
You do it like this
CALL yourmacro PARAMETERS paramInMacro = someValue
Christophe wrote:
Is it possible to call an object other than by its sum in the library?
??? I have no idea what you mean
Christophe wrote:
Is it possible with GDL to call a parameter of an element or even to concatenate or add the results.
Hopefully I understand you right, but you can do so in the Parameter script. Don't forget to save your parameter back afterwards!
Like:

foo = 1234  ! number

bar = "Test"  ! string

! for concat just use the plus operator
qux = bar + " " + str("%^~", foo)
! those flags are a bit pesky
! % -> obligatory
! ^ -> no thousand delimiter
! ~ -> no decimal fractions

! save the parameter back
parameters   myparam = qux
How "str()" works is a bit troublesome, but just consult the handbook.
Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Christophe wrote:
Is it possible to call an element like object and if it's possible are we able to call an element other than by its name in the library?
I am French and my OS corrects me thinking that I want to speak French ... I therefore resumed my first message. THANKS to you already for these precious answers.
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 13 Ventura - MacBook Pro M2 max- 32Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
runxel
Legend
Christophe wrote:
are we able to call an element other than by its name in the library?
Ah!
Well... no. Not that I am aware of, at least.
Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
I use a GDL object to adjust the rotation in X, Y and Z of an e57 point cloud.
For this I use the CALL command but when I integrate the variable into my 3D script like this :
CALL name PARAMETERS upperPlaneHeight = upperPlaneHeightnew
I've created "upperPlaneHeightnew" to be able to modify it.
But by using and modifying this parameter through my GDL tool... Nothing is happening 😕
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 13 Ventura - MacBook Pro M2 max- 32Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
runxel
Legend
Christophe wrote:
But by using and modifying this parameter through my GDL tool... Nothing is happening :/
I've never worked with pointclouds, but it sounds like you just made up a new parameter in the object you're actually calling, right?
Well, no wonder then! Your new parameter inside the macro (the pointcloud object?) doesn't do anything.
The parameter has to be used inside the macro somewhere; just making one won't help.
Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
runxel wrote:
Well, no wonder then! Your new parameter inside the macro (the pointcloud object?) doesn't do anything.
That means I'm not able to modify point clouds parameters through another GDL objet ?
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 13 Ventura - MacBook Pro M2 max- 32Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
runxel
Legend
Christophe wrote:
That means I'm not able to modify point clouds parameters through another GDL objet ?
Not really the best go-to guy for that. I have no idea if point clouds even do have any parameters, but I vaguely remember the statement you can't do much more than displaying them.

However you can cut them.
Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Hi runxel,

I have just tried to use CUTPLANE command on a e57 file imported into Archicad....
It works fine

Now I have to understand this command as well to be able to use it with altimetry !
GDL is great ! I'm going to do my own tool like the weblink you give me (thanks about it).

Have a great day !
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 13 Ventura - MacBook Pro M2 max- 32Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin