cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Rob
Graphisoft
Graphisoft

Incrementing a parameter by 1

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 Solution

Accepted Solutions
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

Go to post

4 Replies 4
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.

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!