cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Design forum

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

F_ Beister
Enthusiast
DirectLink

Thanks. Very helpful.

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? Start a new discussion

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!