We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-04-04 11:20 AM
Hi all,
Is there someway to combine the following? sg_customName[i][2] is a text array.
name = STR ("%2.0", i) + " " + sg_customName[i][2]
I have used the custom name by itself for some options and i string for others, but I would like to add the option to prefix the custom name.
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
Solved! Go to Solution.
2023-04-12 09:40 AM
The menu is not new, but it has to be added manually through Work Environment > Menus > All menus in alphabetical order.
In the linked object's master script this is suspicious:
This is clearly not a string, and gets written back to sg_customName.
2023-04-04 02:17 PM
I don't get it. Are you doing this in a loop with 'i' being the counter?
Can't see why it shouldn't work?!
2023-04-04 03:05 PM
I have come across situations like that which look correct but GDL won't handle the parts. In such situations I would break that line into some local variables and then add the variables together. It may be you only need to separate out the STR function.
2023-04-05 03:33 AM - edited 2023-04-05 03:34 AM
Inserting the various parts into their own local variables does not change anything, still resulting in an incompatible types error when it comes to putting them together... It has to do with the array, as there is no issue when using a non-array text parameter.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-04-05 10:51 AM
Did you maybe mix datatypes inside the array? An array in GDL can either hold integers, floats, or strings, but mixing is disallowed.
2023-04-05 11:22 AM
The array contains two columns of text / strings...
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-04-05 04:00 PM - edited 2023-04-05 04:02 PM
Is your data coming from external files? There is a known issue about the input addons, they convert number-like strings to numbers.
Are your arrays, variables always initialized as strings? During script check, global variables contain dummy values and requests might not return anything, which can lead to mis-initialization if you don't handle it correctly. Variables are initialized to zero unless said otherwise. Use Library Developer menu > Check library scripts for warnings to receive information about uninitialized variables.
2023-04-06 03:26 AM
The object is completely internalised. The only Global used is glob_scale. The object can be found in this thread. The line in question above has been commented out.
Is that a new menu in 26? I am scripting in 22.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-04-12 09:40 AM
The menu is not new, but it has to be added manually through Work Environment > Menus > All menus in alphabetical order.
In the linked object's master script this is suspicious:
This is clearly not a string, and gets written back to sg_customName.
2023-04-12 10:32 AM
*facepalm*
Resizing so many arrays and having issue with some not resizing that I did not notice that... Thanks Peter.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |