Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

wall labelling: question for the experts

Richard Swann
Booster
I am trying to script a 2D label object that starts at the first point of the active line of a wall.
To overide the ArchiCADS default labelling position (auto labelling) I can return to the origin:
add2 -1*( label_position[1][1]), -1*(label_position[1][2])
Then I need to move it to the end of the wall which should be found from the WALL_POSITION variable.
The problem I am having is trying to make the 2D script read the variable. From a Print command I know that WALL_POSITION is 3 coordinates delimited by a spaces. To get x and y coordinates for the 2D script I have tried:
txtwall=SPLIT (WALL_POSITION,"%s %s %s" , valx, valy, valz)
but get a "Bad indexed value reference" error message. I have not used the split command before so not sure this is the right way to seperate it out. I get the same error messages with the STR command.

Any GDL experts care to advise? Is there a simpler way of moving to the end of a wall?
Richard Swann

MacOS 11.7 , Intel Imac 4k ArchiCAD 4.5-27 (Solo)
2 REPLIES 2
Frank Beister
Moderator
I have not the time to check it out, so maybe the following is not right:

If you PRINT an parameter, which is an array, all values of the whole array will be printed separated by spaces.

WALL_POSITION is an array. Means you have three numeric values:
WALL_POSITION[1], WALL_POSITION[2], WALL_POSITION[3]

Does this help?
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Richard Swann
Booster
Thanks for that. Should have realised it was an array, so no need to break it up with split. All works fine!
Richard Swann

MacOS 11.7 , Intel Imac 4k ArchiCAD 4.5-27 (Solo)