The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Topics specific to the scripting and development of Library Parts and Libraries using Param-O or the Geometric Description Language – GDL. (Example: How do you use “REQUEST” GDL commands?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, Gordana Radonic, nbalogh, mnguyen, gkmethy, rmasaki, Akos Somorjai, Csilla Mai, Peter Baksa

#321136
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... :roll: :roll:

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

hope you can help me :roll: :roll:

best regards from vienna,
Yours, Klaus
#321142
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!)
#321157
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. :( :roll:

Thank you for your help :) ,

Yours, Klaus
#321267
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:
Code: Select all
rkv_id = text-file-value
parameters rkv_id = rkv_id
#321268
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.
#321269
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-tric ... xml-add-on