flag for values{2}
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-04-05 11:21 AM
2016-04-05
11:21 AM
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

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-04-05 12:21 PM
2016-04-05
12:21 PM
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, opt2In this second case, opt1 and opt2 should be number type parameters.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-04-05 01:12 PM
2016-04-05
01:12 PM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-04-05 02:12 PM
2016-04-05
02:12 PM
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[]
E.g. DIM vDesc[],
VNum[]
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-04-07 12:01 PM
2016-04-07
12:01 PM
Thanks, arrays are the best
