We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Incrementing a parameter by 1

Rob
Graphisoft
Graphisoft
Guys,

do you know a reliable way to increment a parameter by 1 in the parameter script? The problem is that the parameter script is run several times in order to recalculate all parameters... and that stuffs it up.

an example:
I want to increment (by one) the value of a parameter "A" each time you click the button on the custom UI tab.

Any thoughts?
::rk
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Anonymous
Not applicable
This should do it.

	n = APPLICATION_QUERY ("PARAMETER_SCRIPT", "FIRSTOCCASION_IN_PROGRESS", isFirstRun)
	IF isFirstRun THEN
		A=A+1
	ELSE
		A=A
	ENDIF

View solution in original post

4 REPLIES 4
Solution
Anonymous
Not applicable
This should do it.

	n = APPLICATION_QUERY ("PARAMETER_SCRIPT", "FIRSTOCCASION_IN_PROGRESS", isFirstRun)
	IF isFirstRun THEN
		A=A+1
	ELSE
		A=A
	ENDIF
Rob
Graphisoft
Graphisoft
Thanks mate!

What documentation did you get this from?

edited:
I see... Basic Library Documentation...

Anyway, thanks again.
::rk
Frank Beister
Moderator
DirectLink

Thanks. Very helpful.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Nader Belal
Mentor
Thank you Michael
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.