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

flag for values{2}

Anonymous
Not applicable
I would like to create a group for values{2} - values, but it doesn't work. Can anybody help me?

Example:

I have this:

values{2} "A1" 1, 'opt1', 2, 'opt2'
values{2} "A2" 1, 'opt1', 2, 'opt2'
values{2} "A3" 1, 'opt1', 2, 'opt2'
etc.

many parameter with the same values

I would like to control them together, like this

options="1, 'opt1', 2, 'opt2'

values{2} "A1" options
values{2} "A2" options
values{2} "A3" options
etc.

but this doesn't work
Any ideas?
4 REPLIES 4

Laszlo Nagy
Community Admin
Community Admin
I have not checked this but my first idea is that you should not mix parameter types in a VALUES command. 1 is a number, but 'opt1' is a text. Try this:
values{2} "A1" '1', 'opt1', '2', 'opt2' 
or this:
values{2} "A1" 1, opt1, 2, opt2 
In this second case, opt1 and opt2 should be number type parameters.
....................................................................................................
Laszlo Nagy, Lead Moderator, Community Admin
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Anonymous
Not applicable
First, thanks for the reply,

It's not a mix. I would like a numerical parameter values {2} which have a numerical expression, and descriptions as well.

like here:
http://gdl.graphisoft.com/gdl-basics/parameter-logic/

but my problem is, that as I have many parameters, I have to script this about 10-20 times, and If I have to change the values, I would like that all the 10-20 parameters would change together.

An other question:

Can I refer somehow to the parameters, as a number?

I have parameters like this
A1, A2, A3, etc

and I am looking for a way to loop the value description, like this
for i=1 to number_of_A's
    values{2} "A+number_of_A's"  1, 'opt1', 2, 'opt2', 3, 'opt3', etc
next i

Bruce
Booster
Arrays are your friend in this instance. You would declare two arrays - one for numerical, one for alpha (can't mix type when used in certain situations). Then you just use the array in your value statement.

E.g. DIM vDesc[],
VNum[]
Bruce Walker
http://www.brucepwalker.com
https://www.mindmeister.com/65450406

-- since v8.1 --
AC22 6025 INT Full | macOS Mojave 10 | 3.2 GHz Intel Xeon W | 32 Gb RAM | Radeon Pro Vega 56 8 Gb

Anonymous
Not applicable
Thanks, arrays are the best

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!