Jump to content

Connect points (2D or 3D loci) into lines?

Recommended Posts

Posted (edited)

How do I select a group of 2D or 3D loci and then create a polyline (or NURBS curve, if 3D) from them?


I just want to select a group of properly-arranged 2D or 3D loci (i.e. they are all in a proper linear or curvilinear arrangement, there are no path crossovers or branches) and do something like "Create Line from Points..."  but there is no such command?


VW Designer 2021 SP3.1

Edited by Gilbert Osmond
Link to comment
23 minutes ago, Boh said:

I use the 3d polygon tool


I know how to use the polygon tool to draw lines by hand.


What I want to do is select a group of 3D loci (in this case, a roadway alignment from a survey I just imported) and have Vectorworks automatically connect all the points with a polyline or NURBS curve. If there was a menu command "Connect Points into Line..." I would use that but as far as I can see there is no such command or anything similar.

Link to comment

@Gilbert Osmond I am unaware of a tool in Vectorworks that will do this for you.  In AutoCAD, there was a 3rd party developer that created some tools to do so.  So, I imagine such a tool could be made in Vectorworks using a script or other programming tool, maybe someone has already done this.  Maybe @Pat Stanford knows of something?  Perhaps check the Customization area of the forums.  I could see where this would be handy when dealing with a bunch of points from a surveyor that did not include the centerline of the roadway 🙂


Link to comment

Maybe there's some plug-in or 3rd party script that will turn up to help me do this.


As a CAD platform that aspires to be survey-ready I find it hard to believe that VW doesn't include this feature as part of its basic functionality.


The very nature of survey work is point collection, and it's frequently thousands of points, many of them marking out non-rectilinear 2D features such as paths, roads, irregular garden beds, etc.


I spent nearly 1.5 hours since I first posted this question here, laboriously clicking from point.. to point.. to point.. to point.. to point... with the Polyline tool.. to connect over 2,400 roadway survey points from raw survey data that were imported as 3D loci.

Link to comment

Just out of curiosity, what program, other than survey specific processing tools, does this natively?  Neither AutoCAD nor Civil 3D did this last I used them.  I always had to go back to my surveyor and request them to process it for me.  I believe they used Carlson or similar exported to DXF,

Link to comment

Not sure if any do. I am not a licensed surveyor but I do a fair amount of informal surveying using GPS equipment to capture client landscapes. The workflow is easy -- shoot points, download a .CSV file of coordinates, import it into VW, and it's ready to use  -- just need a way to connect dots semi-automatically to expedite linework.

Link to comment

Not sure if this accomplishes anything desired, but ...

The vwx site model (DTM) from 3d loci produces a point to point perimeter, plus the interior topography. If the raw data is somehow delimited, eg if provided with separate layers or classes for roads, beds , creeks, paths, etc, then a separate DTM for each will produce separate perimeters. 

and contour interval adjustments might be useful in some way for this 



  • Like 1
Link to comment
Just now, Benson Shaw said:

Not sure if this accomplishes anything desired, but ...

The vwx site model (DTM) from 3d loci produces a point to point perimeter, plus the interior topography. If the raw data is somehow delimited, eg if provided with separate layers or classes for roads, beds , creeks, paths, etc, then a separate DTM for each will produce separate perimeters. 

and contour interval adjustments might be useful in some way for this 




That's an interesting round-about way to achieve a similar result. I wonder if it would work for "1-dimensional" site models, i.e. where the "site model" is just a single  line of points with no width (i.e. no cross-slope area.) Maybe I could use this to create 2D figures and then just convert the site model  (in 2D plan view) to lines, and throw away the site model. Roundabout method...

Link to comment
26 minutes ago, Gilbert Osmond said:

Roundabout method...

Totally roundabout.  I was just playing with a work flow to extract the perimeter:

Make the DTM, Edit Crop, Select/Copy the crop (a 2d poly), Exit. Paste in Place. Send to Surface. Result is a Group. Ungroup to reveal a 3d Poly following surface perimeter.


The DTM has an algorithm to choose which source points are perimeter and which are interior topo, so all this probably doesn't meet the need. at least I can't make it do just a lasso selection of a curving line.  Oh, well.


41 minutes ago, Jesse Cogswell said:

an algorithm to determine a clockwise or anti-clockwise path

Left to right, or screen upward/downward might also be needed if closed path is not desired (eg edge of roadway or path - it never connects to edge at the other side).   But thanks for this script!



Link to comment

I suppose I never asked if the polys wanted to be closed or not.  If not, remove the lines with the ClosePoly; procedure and it will generate open polys.  Doing a left to right or down to up sorting of the points wouldn't be terribly difficult, but I don't quite have time to add it right now.  I'll see if I can get to it tomorrow night.

Link to comment
1 hour ago, Jesse Cogswell said:

I could write a script...

...Let me know if this works for you or if this totally breaks something.  It worked in my admittedly brief amount of testing on VW2019, but there's no reason it shouldn't work in VW2021.


I just added this to my Resources in VW Designer 2021. An initial test shows that it works pretty well. Thanks very much,  learning to program with Vectorscript exceeds my time/attention budget for the forseeable future.







  • Like 3
Link to comment
9 hours ago, Jesse Cogswell said:

Glad to hear that this worked.  ....

... It's less complicated than what's above but still not all that intuitive.


This is fantastic work. If you accept donations via cryptocurrency or some other online tips platform, consider posting it so I can compensate you for what this is worth to me. At least $50 USD.


Thanks again & I look forward to ongoing refinements time-permitting.

  • Like 3
Link to comment

I apologize for the delay, last week was a bit rougher than expected.


I have fleshed this out a bit more, opening a dialog box allowing you to choose the "direction" of the locus points when producing the polyline, whether or not the polyline is closed, whether or not the source locus points are deleted, and which class and layer the polyline will appear in.  The script also remembers your last choices for direction, closed poly, and delete points to save a little bit of time when running this tool if you don't need to change settings.  Class and layer will always default to the active class and layer when you run the tool.


Screenshot of dialog box



The tool is attached as a .zip file.  Installation is mostly painless, but to start, you will want to make sure that if you saved the previous version of the tool using the Plug-in Manager, you will need to make sure to either delete the previous tool or to change the name to something other than Create Poly from Locus Pts.  After doing that, follow the steps below.

  1. Download the attached .zip file to a convenient location.  DO NOT unzip it.
  2. Click Tools - Plug-ins - Plug-in Manager
  3. Click on the Third-party Plug-ins tab
  4. Click on the Install button
  5. Point the Explorer/Finder to the downloaded .zip file
  6. Restart Vectorworks
  7. Add the tool to your workspace following the steps outlined in my previous post.  You will find it under the JNC category.

@Gilbert Osmond , your offer is a pleasant surprise and very well appreciated.  I am a bit conflicted about this, as I answer questions on here as a way to help others navigate the oftentimes opaque documentation from Vectorworks and the usual list of workarounds you sometimes have to use to make Vectorworks fit into different workflows (as someone on here once called "Vectorworkarounds").  I have a large frustration with broken tools and feature requests go unanswered year upon year when it seems that Vectorworks would rather focus on adding half-baked features that often don't work properly out of the box.  This is why I don't mind putting some time toward some of the more "simple" feature requests.  I also enjoy the strict problem solving of programming as a break from my usual work (when time allows).  All that being said, I also won't turn down money, so if you still want to send me a tip, the best bet would be Paypal, and I can DM you the relevant email address.


Please let me know if you see anything weird with this tool.  I did some pretty rigorous testing in VW2019 to make sure that stacking order wouldn't interfere with the Left-Right or Top-Down directions, but the algorithm is a bit tricky and there may still be some bugs in it.

Create Poly From Locus Pts.zip

  • Like 1
Link to comment

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.

  • Create New...