BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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.

Z-values of a text file into a mesh?

Anonymous
Not applicable
Hi!
I have a text file(* which has thousands of Z-values separated by a space. I wonder is it possible to get them into a MESH using GDL script?
I’ve been able to read the values from text file using Text I/O add-on, and even put them into parameter buffer (using PUT command). But the problem is that I should be able to read them in ”inside” MESH command. Like:
mesh a, b, m, n, mask, [and then:] z11, z12, z13… etc.
I guess there is no way to do that?

*) Nevermind the lack of X- and Y-values here; the file format is Esri Ascii file where the X and Y are defined in the beginning of the file via coordinates, number of columns and rows, and cell size.
11 REPLIES 11
Erwin Edel
Rockstar
Try using http://arcscripts.esri.com/details.asp?dbid=15144 this converter to get XYZ format file and then read the xyz file from Options > Place Mesh From Surveyors Data...

Maybe that works?
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Anonymous
Not applicable
I've already found that page. But unfortunately it's for ArcGis which I don't have. And I'm using Mac.
But: converter is made with python language. Is it so that it's not compatible with other applications? I have QGIS, instead...
Alex Moruzzi
Participant
From what I remember, you can place a for next loop inside the mesh command ...
Then use get nsp or so for the values
Archicad 19 - OSX10.10 - MBP early 2011 16G/ssd
Anonymous
Not applicable
Alex wrote:
From what I remember, you can place a for next loop inside the mesh command ...
Ok, that sounds promising.
Thanks both of you!
Erwin Edel
Rockstar
Long ago I used excel and notepad and some copy pasting in between to generate my own surveyor data file from some coordinate values. I think I got that to work with the import data function in the end.

But it sounds like you have a LOT of values to work with.

I think you can import the esri into qgis and you might be able to export to XYZ or ascii coordinates there.

http://wiki.tuflow.com/index.php?title=QGIS_Importing_a_Grid
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Erwin Edel
Rockstar
Can you share the esri ascii file here? I have QGIS installed, can have a look if it works.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Anonymous
Not applicable
Erwin wrote:
Can you share the esri ascii file here? I have QGIS installed, can have a look if it works.
I'll get back to this tomorrow. The original land survey .asc files are quite big, but I've made a small one to be tested with GDL object. I can send that one.
I know that .asc file works with QGIS, but the possibility to use python language add-ons is way over my capabilities.
Erwin Edel
Rockstar
From what I'm reading GRASS should be able to export the imported raster to xyz.

I'm using Windows 7 version of it.

http://gis.stackexchange.com/questions/45197/what-is-xyz-format-in-qgis
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Anonymous
Not applicable
Alex wrote:
From what I remember, you can place a for next loop inside the mesh command ...
Then use get nsp or so for the values
I tried to google this, but couldn't find any references. Somehow it seems strange to be able to place FOR...NEXT inside MESH - or any other - command. I might be wrong. But while searching I found this:
http://archicad-talk.graphisoft.com/viewtopic.php?t=4683&postdays=0&postorder=asc&highlight=twisted+...
It seems that placing a GET command inside 3D shape command is ok. So no direct help but I learned some GDL basics!
Erwin wrote:
But it sounds like you have a LOT of values to work with.
Yes; the .ASC text file is 69 MB.
Erwin wrote:
From what I'm reading GRASS should be able to export the imported raster to xyz.
I'm using Windows 7 version of it.
http://gis.stackexchange.com/questions/45197/what-is-xyz-format-in-qgis
I checked the link, and it seems QGIS can do it. I tried this (from the linked page):
"You can use Raster->Convert->Translate form the Qgis menu, and edit the command line from -of Gtiff to -of XYZ. "Save As" is only working for vector layers."
I don't know, what editing command line -of Gtiff to -of XYZ means. I didn't see anything like that. The result is XYZ file. But something odd happens: file size is ca. 310 MB (compared to ASC 69 MB), and the Z-values has 13-15 decimal numbers. In ASC there is only 3.

Now I don't have time to try XYZ in ArchiCAD. I'll write some report here later.

So:
- GDL object which reads the ASC file would be nice if several people are using it (no need to use QGIS). But in order to work I have to edit file's couple of first rows by replacing several spaces with tabs. This is for GDL's TEXT I/O command.
- Using QGIS (if translate will be fine) is nice, since there's no need to edit the ASC file.

(I couldn't attach the ASC file...)

Thanks again!

EDIT: "It seems that placing a GET command...", not 'PUT'.
Learn and get certified!