We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Modeling
About Archicad's design tools, element connections, modeling concepts, etc.

Coordinate List?

Anonymous
Not applicable
Is there any way to generate a txt. file consisting of a list of coordinates of any element? I want to produce a list of construction staking coordinate info. I have searched through the entire calculate menu to find some way to generate some x,y,z info of a hotspot,column,elevation dimension anything! No luck! I would be willing to pay for some help generating an object or GDL script to do this. Any help much appreciated!
33 REPLIES 33
Anonymous
Not applicable
Who could be employed to build me such an object? I can't spend the time to learn that much GDL at this time.
Anonymous
Not applicable
I've got the special menu. Now I can't seem to save as gdl.
Anonymous
Not applicable
OK, I saved it as a GDL, how do I get to the GDL script that contains the coordinates? Bear with me guys!
Karl Ottenstein
Moderator
Flamer wrote:
OK, I saved it as a GDL, how do I get to the GDL script that contains the coordinates? Bear with me guys!
It's wherever you saved it. 😉 Open the file in Notepad or Word.

I noticed an inconsistent glitch where sometimes I would have to close the 3D window and then open it again before the Special Menu's GDL save would create the file.

HTH,
Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Got It! Now I will work on a way to filter out what I dont need. Thanks Again
Anonymous
Not applicable
Flamer wrote:
Is there any way to generate a txt. file consisting of a list of coordinates of any element?
Mark

Add this code to any object, ie make a simple cross-hair symbol

!Put in property script

component "X",SYMB_POS_X,"m"
component "Y",SYMB_POS_Y,"m"
component "Z",SYMB_POS_Z,"m"

You will have to set up a custom component listing ( a basic text list type). I have done a quick test of the settings:

Under the parameters tab:
check the global element parameters "Internal ID"

Under the listing tab:
list each element individually
sort by internal ID first
then component name
then the component quantity

This will produce a list of similar to:

Internal ID | Component Name | Component Quantity |
-------------|----------------|--------------------|
3 | X | 299,948.706 |
3 | Y | 700,006.840 |
3 | Z | 0.000 |
4 | X | 299,951.322 |
4 | Y | 700,016.286 |
4 | Z | 0.000 |
5 | X | 299,962.076 |
5 | Y | 700,007.276 |
5 | Z | 0.000 |
6 | X | 299,964.691 |
6 | Y | 700,018.901 |
6 | Z | 0.000 |

I hope this is of some help, regards
Karl Ottenstein
Moderator
Bill wrote:
!Put in property script

component "X",SYMB_POS_X,"m"
component "Y",SYMB_POS_Y,"m"
component "Z",SYMB_POS_Z,"m"
Duh. Of course. Brilliant, Bill. Hopefully Djordje will copy this 'proper' tip over to where the earlier part of this thread went (with my now-to-be-disregarded special menu thing).

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
As Karl said, Brilliant! I am adding the code to the object Karl posted. I have a feeling it will produce metric results though. It shouldn't be to hard to have the script do the conversion. Thanks Bill! Definately tip material!
Anonymous
Not applicable
I added *3.281 in parenthesis to each line of the property script. this converted it to feet. Were are so close. I have tried to change the script to get the coordinates to list in the following format- User ID, X, Y, Z
I can't figure out how to get the coordinates in the same row and only show the ID once on each line.
Is there any way to generate the coordinates based on the user origin? If it is not possible to do this directly, is there a way to return the coordinate of the user origin alone within the script and then use that value to calculate an offset for each coordinate. If this isn't possible than maybe I (we) can use another object' coordinates as the offset. At this point I would be happy to just get the output in the proper format. Thanks again
Anonymous
Not applicable
Flamer wrote:
I can't figure out how to get the coordinates in the same row and only show the ID once on each line.
From the department of sneaky tricks...

component "XYZ," + str("%#10.4df",SYMB_POS_X) + "," + str("%#10.4df",SYMB_POS_Y) + "," + str("%#10.4df",SYMB_POS_Z), 1, "m"

Gives you:
Internal ID | Component Name | Component Quantity
--------------|-----------------------------------------|--------------------
30,295 | XYZ, 72.6036', 54.3047', 384.7113' |
30,296 | XYZ, 72.7396', 49.2716', 384.7113' |
30,297 | XYZ, 70.2457', 46.7324', 384.7113' |

You may need to force your equipment to read every comma as a field separator or better clean it up in excel. It can also be done with gdl via DATA I/O functions but they are much tougher to learn & get working!
Is there any way to generate the coordinates based on the user origin? If it is not possible to do this directly, is there a way to return the coordinate of the user origin alone within the script and then use that value to calculate an offset for each coordinate.
The simplest way would be to add XYZ offset values as parameters to your library part and subtract them from the SYMB_POS values (assuming all are positive!)

regards