Search code examples
cadgraphisoftarchicad

ArchiCAD GDL Stop parameters being changed multiple times in one operation


If an integer parameter is increased by 1 in the parameter script, e.g.

parameters test = test + 1

the script may run multiple times during one user operation. A parameter that is assigned 1 to start with could then be 4 after one single user operation. Is there a workaround for this?


Solution

  • Seems I overlooked this in the gdl manual. I am guessing many may not know it is there as it is a little hidden away.

    n = APPLICATION_QUERY ("PARAMETER_SCRIPT", "FIRSTOCCASION_IN_PROGRESS", isFirstRun) 
    
    if isFirstRun then ....