Collaboration with other software
About model and data exchange with 3rd party solutions: Revit, Solibri, dRofus, Bluebeam, structural analysis solutions, and IFC, BCF and DXF/DWG-based exchange, etc.

Extracting x,y,z coordinates from a surveyor's dwg file without needing autocad

Hello everyone.


WHY THE SCRIPT?
To extract x,y,z coordinates from a surveyor's dwg file without needing autocad or equivalent.

 

WHAT DO YOU NEED?
-Python installed,
-A software (free) that converts dwg to dxf (https://www.opendesign.com/guestfiles/o ... _Converter)
-Two python libraries that the script will suggest installing.

 

OPERATION:
Locate the ODA software, locate the surveyor's DWG (or DWF), and click on “Extract”.
Then leave all the points you wish to extract checked (you can sort them by Z height to easily uncheck Z=0 values).

Capture d’écran 2025-04-28 à 17.07.43.png

 

 

Once the points have been ticked, click on “Export TXT”, which generates a file that can be imported by Archicad using the “Place mesh according to surveyor data” command:

Capture d’écran 2025-04-28 à 17.42.30.png

This generates a mesh

Capture d’écran 2025-04-28 à 17.06.21.png

TO KNOW
I had a script in my far-beyond to-do list of Python scripts that I tried out this lunchtime with AI Claude, and which took me 1 hour to set up, without coding myself. The script is therefore easily modifiable by you: you give the script to the AI and give your indications to modify it.

 

TO DO:
-Color lines to indicate what will be exported
-Automatically uncheck 0 values for Z
-Add an option to modify values by addition, subtraction...
-Check different surveyor file types.

 

NB: Opening Archicad to more Python commands can change our processes.

THE SCRIPT:

 

Operating system used: Mac Intel-based 12.7

Archicad 27 - GDL - PYTHON
2 REPLIES 2
danielk
Enthusiast

This looks really cool!

 

Previously, when I was in this situation, I solved it by importing the DWG as a 3D object into Archicad, and then opening the 3D script, where the XYZ coordinates were neatly lined up for me to copy into a TXT file and save as XYZ.

 

This solution requires some preparation (getting the application and the libraries), but then it seems like a more convenient and faster solution.

 

Once again, looks great, congrats!

The script propose to autoinstall those libraries, so the real preparation is installing the ODA converter (https://www.opendesign.com/guestfiles/oda_file_converter).

 

In addition to the simplicity of using a dedicated tool, the advantage lies in the ability to filter by layer. Once you import in 3D, all points are merged in a single file.

Archicad 27 - GDL - PYTHON

Setup info provided by author