We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

Can "Values" & "Values{2}" errors affect other library parts ?

Nader Belal
Mentor

Hi everyone,

 

"Values" & "Values{2}" are used to limit the user to a previously defined multiple options.

 

Values{2} uses integer number in its definition paired with a text (or an integer array paired with a string array).

Values uses what ever you want list type (or an array).

 

But I have observed that in case of values{2}, the program under no circumstance admit any repeated text like below:

 

 

values{2} "Param", 1, "A", 2, "B", 3, "A"

 

 

 
On the other side, Values do admit multiple equal similar values without any problem:

 

 

values "Param", "A", "B", "C", "A"

 

 

 

Can multiple equal values used with Values in a library part in a loaded project, cause havoc to the project file and/or developing a new object ?

A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
6 REPLIES 6
Lingwisyer
Guru

Values{2} annotation is only there for display in the UI so that is a non-issue. And Values would just give multiple options that give the same result? So I do not see how that would create any issues, just menu clutter.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660

I do understand that, but the file that I´m trying to link to is giving me a lot of headaches, crashes, and rejections to work (more than normal).

 Apparently, there is no error in the script that I´m trying to link to, and the only error I have found is with Values having a number of repeated selections

Values "Param", "A", "B", "C", "D", "B", "E", "C"
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.

Indeed, VALUES does not like it if there are multiple entries of the same content, no matter what the type (string or integer).

 

Same holds true for VALUES{2}! Also here all value entries have to be different from eachother.

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

Which I admit is sometimes a bit of a pain, if you want to use the values directly as input for a function – which at least I do very often.

 

The workaround is to have the values hold the index of an (pre-populated) array. Then you can use the current value as a reference to the field with the correct content.

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

That suggestion is perfect!

What I'm asking if Values assigned to a String Array, were some of the array values are equal could create havoc on an Archicad PLN file ?

A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.

For values{2} & ui_infield(s) I almost always create a set of array parameters one for values, next for strings and the third for ui pictures...and they are dynamically created in the masterscript, sometimes it can give some pain when finding bugs in the UI.. but otherwise work great. (ui_infield can fit one line  😉 )

Piotr