GDL
About building parametric objects with GDL.

Transferring a value from a variable to a lib part parameter (with SYMB_POS_FROM_SURVEY_POINT)

Martin Jan Rosa
Booster

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

www.martinrosa.cz
GRAPHISOFT Certified Archicad BIM Manager, 2021, 2023
AC 28 CZ @ macOS 15.0 @ MacBook Pro M3 Max
5 REPLIES 5
scottjm
Advisor

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?

Scott J. Moore | Fulton Trotter Architects | BIM Manager, Associate, Architect
Since AC13 | Current versions AC23.7000 & AC26.5002 | BIMCloud Basic | Python, GDL, VBA, PHP, SQL, CSS
Certified Graphisoft BIM Manger (2022)
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe

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.

www.martinrosa.cz
GRAPHISOFT Certified Archicad BIM Manager, 2021, 2023
AC 28 CZ @ macOS 15.0 @ MacBook Pro M3 Max

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. 

Scott J. Moore | Fulton Trotter Architects | BIM Manager, Associate, Architect
Since AC13 | Current versions AC23.7000 & AC26.5002 | BIMCloud Basic | Python, GDL, VBA, PHP, SQL, CSS
Certified Graphisoft BIM Manger (2022)
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe

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.

Tomas Stehlik
Contributor

...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.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!