We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-10-13 08:15 AM - edited 2022-10-13 08:18 AM
Hi
I'm making a label for Finishing materials.
there is a problem to solve that I want to skip the value named AIR but i don't know how to skip it.
For example, in this picture Even if the slab contains 4 materials, I don't want to label the material named AIR.
this is the scripts i used.
for i = 1 to numText
autotxt[i] = "T" + thk + " " + MATname[n] |
I don't see how to exclude the value MATname[n] = "AIR" in the middle of this root.
Even if i force it to make it by removing the value, it was only marked as zero, but it was not completely removed.
I want only three expressions: AA, BB, and CC on my label.
Like this picture.
Please help me to solve this problem.
thank you.
2022-10-13 12:27 PM - edited 2022-10-13 12:28 PM
a simple if statement inside the loop should do the trick:
if (MATname[n] = "Air") then
autotxt[i] =""
else
autotxt[i] = "T" + thk + " " + MATname[n]
autoTHK[i] = MATthk[n]
endif
After that I asume you loop over autotext[] to get the lines of the label, so you can check for autotext[i] lenght and if it is less than 1 you can skip it.