Jump to content

Draw 3D polygon line through x,y,z points from text file

Recommended Posts

I’m trying to input a series of point that were delivered in x,y,z format in a text file that define a design line to work from.

I’m able to load these points into Vectorworks using the “Import Survey File” as 3D Locus but haven't found a way to draw a 3D polygon line through these points other than doing it manually which is very time consuming when there are hundreds of points.


At the moment I have to take the text file and turn it into an AutoCAD script by adding the command “3Dpoly” as the first line of the file and then run the script within AutoCAD where is creates the design line, after this I have to import into Vectorworks.  Where this does work it is time consuming and does require an additional CAD package to do this.

I have been looking for a way to do the same within Vectorworks but so far have been unsuccessful and though Marionette might have a way to do this but my knowledge of Marionette is very limited at the moment and could not find a way to read the values from the text file,;any assistance with this would be much appreciated.

Example x,y,z file attached.

10 metre points xyz.txt

Share this post

Link to post

It depends of what you want to do with the points. Is this for terrain or landscape design? It sounds like you could try to use the DTM and make a surface of the points 

Share this post

Link to post

Thanks Hans-Olav for the quick reply,
In this instance the design line represents an edge of a walkway/ramp (not a surface) that we have to work up to and use as our design line to work from.
I did try creating a DTM from the points but the amount of work needed to get back to a single 3D line prompted me to see if there was a quicker way to do this.  All that is needed is a 3D line that passing through the points


Share this post

Link to post

Just wondering, if the DTM looks right and the 3D line is at the edge, it could be a possibility to un group the DTM or use the extract line tool to get the lines? 

Share this post

Link to post

Did try the extract line tool but the DTM when ungrouped only gives you a line between two points due to the triangulation and not a continuous line bwtween all of the points.

Attached is what I am trying to end up with, a continuous 3D line bwtween all of the points.


I was wondering if Marionette had the capability of reading a text file with x,y,z coordinates in and passing this to the relevent node


10 metre points xyz.vwx

Share this post

Link to post

Im sure it is possible in marionette, but I don't have the programming skills. You could ask at the marionette forum and maybe @Marissa Farrell will answer (-:


My approach would be to take the lines from the triangulated DTM and "select connecting  object" and then "Combine" to get the long continuous line you are looking for.


Share this post

Link to post

Totally doable in Marionette!



My first question is - are you still on 2016 as your signature states? If so, some of the nodes I'm using are not default content in 2016 and may need to be modified to work, otherwise I'm attaching a 2019 file right now. (If you need a 2016 file just let me know and I'll get one set up for you!)


You'll need to know the path to your text file. What I did was place the text file in the same directory as my Vectorworks file so it's easier to just query the location of my vwx file to find the text file.


All of the nodes in this file are default content nodes in 2019, aside from the "tuple" node which I just used to split up the list of points better.


Screen Shot 2019-01-17 at 7.47.34 AM.png



10 metre points xyz_MFarrell.vwx

  • Like 1

Share this post

Link to post

Oops, sorry forgot to update signature.

I'm on 2019 now (... just updated my signature) it should now show that correctly.

Many thanks for providing a solution to my problem, I'll have a look at your network and see how it works.

I assume the "tuple" node is a custom node you created?



Share this post

Link to post

Yep! The tuple node is just a modified float node, I didn't even update the description (oops!)

Its only purpose is to convert a list type into a tuple type.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...