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

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

Solution
runxel
Ace

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.

Mostly AC 26 on Mac | Author of 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
Ace

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.

Mostly AC 26 on Mac | Author of SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!