cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

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.

Making mesh from map and text values (imported from dwg)

Anonymous
Not applicable
Hi.

I've been using archicad since the beginning of my studies,
so It's 4 years by now. I'm using ver. 15.

Actually I'm working on terrain model for my graduation project.

Long story's short:
I got map imported from DWG. I already organized layers and isolated points heigth (there are actually text with heigth value only - no geometric points)
(also map doesn't contain height lines).
As for now, I can create a mesh, then draw some lines, after that select each one separately and manually enter desired Z-level for every point.
Problem is, the number of points is 1860 and nobody sane would undertake this.

Question:
Is there a way to automatically add points to mesh from location of the text fields? Furthermore, is there a way to generate point Z-level from the value of number, and make whole geometry from text itself?

I don't have any experience with Surveyors design plugin. Maybe there's a way.

Practically:
It would greatly speed workaday modeling basis.

Looking forward to any experience and ideas,
they would be very appreciated.

Thanks.

Update:

I'm doing some reserches:

I found some script for Rhino. You just load 2D mapped DWG text to Rhino, then use the script which read the text value, then adds a point to each text box, and then sets the point in z-value written in text. Great thing, but I got some problems atm, with the script doesn't want to elevate points.

Is there possibility to write script like that for Archicad? Personally I'm no script writter, but I think many people would be very greatful for the time and work it would save them.

The other think is to generate the mesh from those points in space, but this should be less of a problem.
36 REPLIES 36
Anonymous
Not applicable
I´m glad that finaly works!
David Maudlin
Rockstar
This is an article I wrote when trying to understand the format that is used by the Place Mesh from Surveyors Data function:

Creating A Mesh From A Txt File

It contains an explanation of the format used by this function.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
Interesting Article David.
I have attempted to use the X,Y,Z, Code format.

The Points are imported with the correct x,y,z values, but the code (ID) is no where in the mesh file. If the points are defining the location of Landscaping features, Retaining walls or base of structures; the code ID is important. Where or how can the imported text code be found?
David Maudlin
Rockstar
Jay:

The Mesh Tool does not support the IDs. One solution would be to write a library part that reads the txt file, line by line, to place text with the ID at the corresponding points. This would be an Object separate from the Mesh but should overlay correctly. I don't have experience with this area of GDL (File Operations), maybe someone else will be able to give you a start.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
Yes David an object which did such a thing would be perfect. I do not have the skill to do such a thing maybe,but maybe there will be someone that can give me a clue.
sinceV6
Advocate
Jay wrote:
Yes David an object which did such a thing would be perfect. I do not have the skill to do such a thing...
Hello.
How far would your GDL skills take you?
It's really not that hard what you want to do.
Jay wrote:
..but maybe there will be someone that can give me a clue.
Challenge accepted!

Assuming that your .xyz/.txt file works and you can build your mesh, and you are using spaces as delimeters....

Be sure to have your data file available.

Make a new object.
Just add a parameter, string type, Variable name fileName, and give it a description. In the master script, paste this:

!===CHANNEL OPEN=====
!!!ch1 = OPEN ("TEXT", textFile, "SEPARATOR='\t', MODE=RO, LIBRARY") <--- sample: opening the file, using TAB as separator, loaded in library

ch1 = OPEN ("TEXT", fileName, "SEPARATOR=' ', MODE=RO, LIBRARY")

IF ch1<=0 THEN
	PRINT 	"CHECK THAT FILE IS LOADED WITH LIBRARIES\nOR CHECK FILE NAME IN PARAMETERS"
	TEXT2 0,0,"CHECK THAT FILE IS LOADED WITH LIBRARIES\nOR CHECK FILE NAME IN PARAMETERS"
	HOTSPOT2 0,0
	CIRCLE2 0,0,0.10
	END
ENDIF

!===COUNT NUMBER OF ROWS IN DATABASE=====
dataRows = 0
DO
	dataRows = dataRows + 1
	n = INPUT(ch1, dataRows, 1, notUsed)
WHILE n > -1

dataRows = dataRows - 1 !--it counts 1 extra row
!!!PRINT dataRows
!!!dataRowsText = STR(dataRows,2,0)
!==========================================================================

!===COUNT NUMBER OF COLUMNS IN DATABASE=====
dataColumns=1
rowCounter=0
DO
	rowCounter = rowCounter+1
	n = INPUT(ch1, rowCounter, dataColumns, notUsed)
	IF n>0 THEN dataColumns = dataColumns +1
WHILE n > -1

dataColumns = dataColumns - 1 !--it counts 1 extra column
!!!PRINT dataColumns
!!!dataColumnsText = STR(dataColumns,2,0)
!==========================================================================

!===ASIGN VALUES TO ARRAY=====
DIM data[][]	!--this holds the information, two dimension array

FOR i=1 TO dataRows
	FOR j=1 TO dataColumns
		dataRead = ""
		n = INPUT(ch1, i, j, dataRead)
		data = dataRead
	NEXT j
NEXT i

!!!PRINT data

!===CLOSE CHANNEL=====
CLOSE ch1
!=============================================

xx=1
yy=2
zz=3
id=4

trans=0
FOR i=1 TO dataRows
	ADD data[xx], data[yy], data[zz]
	ADD2 data[xx], data[yy]
	CALL "Coordinate Dimension 18" PARAMETERS ALL \
		bID=1, 		bAddText=1, 	strAddTextContent=data[id],
		bID3D=1,	bAddText3D=1,	strAddTextContent3D=data[id],
		fontSizeHeader_mm=1.75, fontSizeCoor_mm=1.5, fontSizeID_mm=1.5,
		bShowCoorX=0,	bShowCoorY=0,	bShowCoorZ=0,
		bShowCoorX3D=0, bShowCoorY3D=0,	bShowCoorZ3D=0
	
	ADD -data[xx], -data[yy], -data[zz]
	ADD2 -data[xx], -data[yy]
		!<--- not using DEL just to keep this in the masterScript. You should move info to their respective scripts.
NEXT i

save and place in floor plan.
It may ask you for a file name prior to saving, or when placing the object.

For review, this is calling the Coordinate Dimension 18 object from the standard library and giving it the corresponding parameters. You would need to modify the script it to suit your own needs.

The basic workflow routine is used to read any TXT file, as long as data is correctly structured. It has many uses, as it basically reads the file and builds an array that has all the data. you just call it later. I know many people will benefit from it.

Hope this helps a bit.

Best regards.
Anonymous
Not applicable
Rookie Try.
What type of parameter is a "String" type? Is in a "Text" type.
Anonymous
Not applicable
Got this error.
Anonymous
Not applicable
I wanted to attach one of the Text (txt) files, but it is not an allowed extension.

It is a Excel Spreadsheet that is saves as a txt file. The format is columns of x, y, z & Code.
Topo txt data.jpg
David Maudlin
Rockstar
Jay wrote:
I wanted to attach one of the Text (txt) files, but it is not an allowed extension.
Try zipping the file (.zip).

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14