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)