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

Update parameters programmatically.

Anonymous
Not applicable
Hi! How update parameters programmatically? Is it possible?
e.g.
if (scaleValues=1)  then !Scale with plan
	Text2 0,1, "Scale with plan"
	Parameters LastScale=0
	LastScale=0
endif

if (scaleValues=0)  then !Scale independent
		Text2 0,1,LastScale
			if ABS(LastScale-GLOB_SCALE)>0 then
				parameters LastScale=GLOB_SCALE 
				LastScale=GLOB_SCALE 
			endif
		Text2 0,2,LastScale
Endif
Thank you!
16 REPLIES 16
Anonymous
Not applicable
Beart wrote:
Look at animated gif-pictures.
Nice looking object. We should have that graphical appearance option for elevation dimensions (with half white - half black triangle) built right into AC.
Can you please share this object when you finish it? Thank you!

Cheers,
Adrian Tudoreanu
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Hi Beart,

How did you proceed with the object? Should we help you further? I got especially interested in this problem as connecting two parameters could be a great example for all GDL beginners. Handling scale is a pretty common problem, too. It would be nice to close this thread with a solution.

Regs,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Anonymous
Not applicable
Hi, ztaskai. I would appreciate your help.

Updating parameters can started:
- If user use parameter of the element
- If user opening window of the object's parameters

Is it possible to doing otherwise way?
Anonymous
Not applicable
adytc wrote:
Beart wrote:
Look at animated gif-pictures.
Nice looking object. We should have that graphical appearance option for elevation dimensions (with half white - half black triangle) built right into AC.
Can you please share this object when you finish it? Thank you!

Cheers,
Adrian Tudoreanu
ztaskai wrote:
Hi Beart,

How did you proceed with the object? Should we help you further? I got especially interested in this problem as connecting two parameters could be a great example for all GDL beginners. Handling scale is a pretty common problem, too. It would be nice to close this thread with a solution.

Regs,
"BeArt Level"
http://archicad-talk.graphisoft.com/object_depository.php?browse=Depository/01%20General/Graphic%20S...
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Beart wrote:
Hi, ztaskai. I would appreciate your help.

Updating parameters can started:
- If user use parameter of the element
- If user opening window of the object's parameters

Is it possible to doing otherwise way?
Hi Beart,

Sorry, I lost this thread when my computer shut down in a blackout.

Basically, yes. All possible triggers for executing the parameter script are listed in Section 4.4 of the GDL Technical Standards which is a part of the Basic Library Documentation ( http://www.graphisoft.com/support/developer/documentation/LibraryDevKit/ ). From AC14, there is one more addition on top of that: the parameter script of zone stamps is run at 'Update Zones' in case the base values of the zone are changed. I'll add that to the online documentation soon.

Best regards,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Anonymous
Not applicable
Hello Zsolt,
ztaskai wrote:
the parameter script of zone stamps is run at 'Update Zones'
Thanks for this.

Just want to verify that the master script is not run at zone update?


Regards, Juha
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Hi Juha,
Juha wrote:
Just want to verify that the master script is not run at zone update?
This should be answered in general. Master script is never run on its own and no script is run without it. You can imagine it as if the master script was copied at the beginning of each script. As a consequence, - in the context of parameter scripts! - the master script will be run exactly as many times as the parameter script itself; which number is determined by the changes caused by the parameter script.

Cheers,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...