2024-09-28 03:18 PM
Dear GDLers,
I am working on a library object that is similar to the Coordinate Dimensions object from the standard library. However, my goal is to have the X and Y coordinates relative to the Survey Point as a library element parameter, and thus be able to output them to a schedule as other library part parameters.
In the 2D script I work with the coordinates using SYMB_POS_FROM_SURVEY_POINT (plus some transformations due to our national practice - this is also the reason why I don't use the standard Survey Coordinate X,Y,Z property for listing in the schedule).
I'm struggling with how to get the value of such a variable into a parameter. The usual route via PARAMETERS doesn't work for me. At the same time, I can't use that SYMB_POS_FROM_SURVEY_POINT directly in the Parameter script (it pops up an error saying it's "project dependent", and I'm not actually surprised at the non-functionality here).
Can anyone think of a tip that might guide me a bit to the right solution?
Cheers,
Martin
2024-09-29 01:26 AM - edited 2024-09-29 01:31 AM
Based on the GDL reference guide the data of
SYMB_POS_FROM_SURVEY_POINT is not accessible by the parameter script, therefore it’s impossible to push that data back into a Parameter unfortunately.
https://gdl.graphisoft.com/reference-guide/general-object-parameters
the only other way I can think to do it is to use
SYMB_POS_X etc and enter the co-ordinates of your survey point in manually and does the offset calculation.
This would mean you’d have to enter the survey point co-ordinates manually in every object though which would be possible risk for input errors.
does the standard Archicad co-ordinate object have parameters you can schedule?
2024-09-30 09:57 AM
Thank you for your reply, which confirms my concerns.
Unfortunately, the standard co-ordinate object does not have the necessary X/Y/Z parameters that could be shown in table.
2024-09-30 01:08 PM
I’ve been lured down that dark path by GDL many times only to find out a certain global variable doesn’t work with the parameter script. It’s very frustrating.
2024-10-10 09:31 AM
The only way to use such global parameters in parameter script is a temporary save to txt/xml file from within UI script and load it back in parameter script.
2024-10-10 01:29 PM
...I also needed these values, for lists (unavailable, 0)
using the object (at the survey point) I found the current global coordinates of the survey point and wrote them for ArchiCAD using the MASTER_GDL object in the user values USER_GLOBAL_1 (U_G_2; U_G_3)
I have the MASTER object in the Embedded Library and it needs to be written again when the SRV PNT is moved.
The returned SRV PNT and GLOB_NORTH_DIR location values are enough for each point to calculate its position to the survey point and such a value can be used in the main window and the properties window.
Small problem is with GLOB_WORLD_ORIGO_OFFSET_X (_Y) but acceptable for me...
I think writing to the Parameter is not good, because it is only updated in the dialog of the object (open). It is necessary to reserve in TW.