GDL
About building parametric objects with GDL.
SOLVED!

Can't the options in VALUES{2} be duplicated?

soo
Contributor

Hi

I have a problem with my skin label.

It has a parameter named "iselectfinish" for showing name of user select skin 

soo_0-1665123840662.png

and this parameter works usually well.

but if a wall has skins with the same thickness and name, it's not working.

 

 

 

When the wall doesn't have the same thickness and name, working good.

soo_1-1665124151161.png

 

 

 

 

this is when it has skins with the same thickness and name on one wall.

this option tap is not working properly.

soo_2-1665124181985.png

 

 

 

<MASTER>

if GLOB_SCRIPT_TYPE <> 2 and GLOB_SCRIPT_TYPE <> 3 then
dim stSelectFinish[]

for i = 1 to numFinish
if (fra(thkFinish[i]*1000)=0) then
stSelectFinish[i] = "THK" + str("%.0mm", thkFinish[i]) + " " + stFinish[i]
else
stSelectFinish[i] = "THK" + str("%.1mm", thkFinish[i]) + " " + stFinish[i]
endif
next i
endif

 

<PARAMETER>

 


dim _iSelectFinish[], _stSelectFinish[]

for i = 1 to numFinish
_iSelectFinish[i] = i
_stSelectFinish[i] = stSelectFinish[i]

next i

values{2} "iSelectFinish" _iSelectFinish, _stSelectFinish

 

I guess this problem come from "valuse{2}" but I couldn't find a way to improve it.

How can i solve this problem? please help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
runxel
Legend

There is something to know about "VALUES{2}" and that is its inability to have identical values.

Neither the integer, nor the associated value are allowed to be repeated. Just think of it, you have two items named the same, which one is the right one? The user surely doesn't know!

 

To avoid that I would do a another check if both thickness and name repeat, and if so append a number to the name.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

1 REPLY 1
Solution
runxel
Legend

There is something to know about "VALUES{2}" and that is its inability to have identical values.

Neither the integer, nor the associated value are allowed to be repeated. Just think of it, you have two items named the same, which one is the right one? The user surely doesn't know!

 

To avoid that I would do a another check if both thickness and name repeat, and if so append a number to the name.

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

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!