We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-12-15 07:03 AM
While making the label for slab complex, I found that the number of skins added to the complex was not automatically reflected.
after modifying the complex, Parameters reflecting the number of skins in the label are not reflected.
I tried to update this numText parameter to the current state by itself, but my ability was not enough.
It is updated only when I enter the settings and do some changes.
<PARAMETER>
|
<MASTER> if GLOB_ELEM_TYPE = WALL_TYPE then if GLOB_ELEM_TYPE = SLAB_TYPE then if GLOB_ELEM_TYPE = ROOF_TYPE then
|
<PARAMETER> if LabelType = LabelTypes[1] then |
I'm happy to know how to solve this issue. Thank you.
2022-12-15 07:21 AM
Try this.
You may just need to set the value of the parameter to be used in your scripts as well as setting the parameter value you see in the PARAMETERS list.
You should never just use 'parameters numHotspot = SKINS_NUMBER + numTextAdd' as that changes the value in the list but not that actual value of the parameter used in the script.
if LabelType = LabelTypes[1] then
numHotspot = SKINS_NUMBER + numTextAdd
parameters numHotspot = numHotspot
numText = SKINS_NUMBER + numTextAdd
parameters numText = numText
endif
Barry.
2022-12-20 12:19 PM
Hi,
To understand it better, think about variables and parameters as a different thing.
In the script you don't access the parameters, only their copies as variables. They get initialized with the parameters' values, but aren't kept in sync afterwards. After a variable is changed, the parameter value can't be accessed afterwards. Changing a variable doesn't change the parameter, changing a parameter with a PARAMETERS command doesn't change the variable.