GDL
About building parametric objects with GDL.

"trigger-button" to run the master-script of library-object

Anonymous
Not applicable
Dear members,

I have created a special zone-stamp-lib-object, which reads some information out of a txt-file.
I put this part of the script into the master-script part of the object.
As it is important that all of these zone-stamps contain the latest data (txt-file change every day), I must often update all the stamps to get the correct data from the txt-file.

At the moment I use the menue "Library Developer" and the command "run parameter-script of all placed lib-objects". This works, but it lasts a long time, because it is updating ALL gdl-objects - although I only need the zone-stamps to be updated by running parameter-script (master-script). - there are about 1,5 tsd. zones and 10 to 20 tds. placed lib-objects in the projects...

Is it possible to integrate some kind of "trigger-button" into "my special zone-stamp" using GDL, so I am able to update all stamps by activating them in 3D-window and "click" a parameter in the property-dialog of zone-stamps...

...or do someone of you know another way to solve my problem

hope you can help me

best regards from vienna,
Yours, Klaus
6 REPLIES 6
runxel
Legend
I have not tested this, but shouldn't opening the zone tool dialog and just hitting "OK" (without changing anything) be enough?
Normally this would trigger a "rebuild" of a GDL object.

(Glad to see you've managed to deal with your zones issue via broadcasting txt files!)
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»
Is the data populating parameters in the parameter list or just local variables in the master script?
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists
Anonymous
Not applicable
Thank you for your replies
Is the data populating parameters in the parameter list or just local variables in the master script?
- Yes, the data from the txt-file are the value of the parameter "rkv_id", which will be exported to dwg-file into a attributed block.

The funny thing is, that when I open the property-dialog of a zone - I see the right value in the field of the parameter. But when be exported to DWG-file, the attribute of the block get no value (if new) old value when altered. I must use the menue "Library Developer" and the command "run parameter-script of all placed lib-objects" to get the correctparameter-values exported to DWG-file.

Thank you for your help ,

Yours, Klaus
Is the data populating parameters in the parameter list or just local variables in the master script?
- Yes, the data from the txt-file are the value of the parameter "rkv_id", which will be exported to dwg-file into a attributed block
If you want the 2D representation to update without having to run the parameter script then you need to set it as a local variable in the master script. The way it seems to work is that the master script runs every time the view is refreshed (because the master script runs before every other script (such as the 2D which runs when the 2D view is refreshed). the 2D view is refreshed every time you pan or zoom, so very often.

so best practice for setting parameter values is to first set it in a local variable in the master script like this:

rkv_id = text-file-value
parameters rkv_id = rkv_id
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists
I have used this technique on my own zone stamp https://www.youtube.com/watch?v=W2aoHwRbOCs
As well as custom zone stamps I have built for firms working on very large projects; such as the Queen's Wharf mega-project in Brisbane by Cottee Parker Architects.

This technique is so effective I now use it for all parameter values. It means I don't have to wait for the value to update in the parameter list before it can be put to use in the other scripts.
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists
Also you may want to consider using XML instead of TXT files as the TXT files have to be reloaded when they change but the XML changes come through instantaneously. Plus there are other benefits

Navigating the XML files is more complex but Graphisoft have put together some documentation on how to do this here:http://gdl.graphisoft.com/tips-and-tricks/how-to-use-the-gdl-xml-add-on
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists

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!