.NET

.NET

Reply
Valued Contributor
mindofcat
Posts: 55
Registered: ‎05-14-2012
Message 1 of 7 (929 Views)
Accepted Solution

How to create a lightweight polyline using existing lines and arcs

929 Views, 6 Replies
03-29-2013 10:32 AM

Hi all,

 

Just wondering if anyone out there is able to help me out with using VB.NET to create a new polyline out of existing lines and arcs? I am converting existing VBA code into VB.NET, developing in AutoCAD 2010 using VS Professional and I just stumbled into this road block.

 

Without using programming code, this task can be accomplished via AutoCAD command by typing the PE command, selecting the JOIN option and then selecting any lines or arcs which should be combined to form a polyline.

 

Using programming code, however, I am quite stumped on this task. I have been able to successfully create the lines and arcs which should form the polyline, and they are all connected as well so they would form a connected polyline; I simply do not know how to proceed from here.

 

Any guidlelines or suggestions?

 

Thanks in advance!

Thanks, just accessed the download link...

Distinguished Contributor
djonio
Posts: 105
Registered: ‎12-29-2005
Message 2 of 7 (926 Views)

Re: How to create a lightweight polyline using existing lines and arcs

03-29-2013 10:45 AM in reply to: mindofcat

Check out TheSwamp. Search GeometryExtensions. There is a bunch of good stuff there. If memory serves it is in C# but you can use one of the online translators. Sorry that I do not remeber the author(s)...if someone does please help me out and post their names.

r,

dennis

Valued Contributor
mindofcat
Posts: 55
Registered: ‎05-14-2012
Message 3 of 7 (920 Views)

Re: How to create a lightweight polyline using existing lines and arcs

03-29-2013 11:04 AM in reply to: djonio

Thanks Dennis

*Expert Elite*
_gile
Posts: 2,133
Registered: ‎04-29-2006
Message 4 of 7 (917 Views)

Re: How to create a lightweight polyline using existing lines and arcs

03-29-2013 11:22 AM in reply to: mindofcat

Hi,

 

You can translate GeometryExtensions (almost the PolylineSegment and PolylineSegmentCollection classes) from C# to VB if you want, but you can also simply reference the DLL (setting Copy Local to True) and use the methods provided by these classes (look at the MJOIN command sample in this reply).

 

PS: download the Doc.zip file too it contains the library documentation (chm).

Gilles Chanteau
Valued Contributor
mindofcat
Posts: 55
Registered: ‎05-14-2012
Message 5 of 7 (849 Views)

Re: How to create a lightweight polyline using existing lines and arcs

04-01-2013 04:07 PM in reply to: _gile

I am still lost on this topic... I tried, but was unable to find a GeometryExtensions reference to include in my VB.NET project reference. However, I did some searching on this forum, and I found the topic "Convert Arcs to Polylines" where an arc was successfully converted to a polyline.

 

This is close to what I need to accomplish, except that, instead of just one arc, I need to convert 3 lines and and arc into a polyline. Is there a way to programmatically join these entities so that they can become one single representation of a polyline instead of just 3 lines and an arc?

 

Please help!!!

*Expert Elite*
_gile
Posts: 2,133
Registered: ‎04-29-2006
Message 6 of 7 (841 Views)

Re: How to create a lightweight polyline using existing lines and arcs

04-01-2013 10:42 PM in reply to: mindofcat

Did you download GeometryExtensions(1.4).zip from TheSwamp (using the above link) ?

The zip file contains GeometryExtensions_18.dll and GeometryExtensions_19.dll. You have to reference the first one for A2010-2012 projects and the second for A3013 and later projects.

Gilles Chanteau
Valued Contributor
mindofcat
Posts: 55
Registered: ‎05-14-2012
Message 7 of 7 (830 Views)

Re: How to create a lightweight polyline using existing lines and arcs

04-02-2013 12:01 PM in reply to: _gile

Thanks, just accessed the download link...

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.