Active Contributor
Posts: 46
Registered: ‎05-18-2007
Message 1 of 3 (381 Views)

from a point3dcollection to draw a 3d polyline

381 Views, 2 Replies
08-23-2012 04:41 PM

I want to create a command:

My selection set consists of dbpoints that exists on my drawing and they are more or less in line

I create a new point3dcollection with this db points

I want to create a 3d polyline based on this point3d collection

My problem is : how to sort this point3d collection based on a picked start point and picked end point?

The only ideea I have is:

from start point i calculate the distance to each point3d from collection and based on the results i sort the point3d collection based on distances

Can somebody have an input on this?



Valued Contributor
Posts: 95
Registered: ‎11-15-2011
Message 2 of 3 (343 Views)

Re: from a point3dcollection to draw a 3d polyline

08-26-2012 04:12 AM in reply to: dancalgary



just stumbled over kean's blog on sorting a pointcollection:




he's using the x-xoordinate as criteria but in the comments below there are references to expand on, more like the problem you state, and a step further in his follow up blog.


hope you'll find this useful.

Valued Mentor
Posts: 370
Registered: ‎05-06-2012
Message 3 of 3 (321 Views)

Re: from a point3dcollection to draw a 3d polyline

08-26-2012 11:43 PM in reply to: dancalgary
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!