.NET

.NET

Reply
Valued Contributor
55 Posts
1 Kudo
Registered: ‎05-14-2012
Post 1 of 7
Accepted Solution

How to create a lightweight polyline using existing lines and arcs

955 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
105 Posts
1 Kudo
Registered: ‎12-29-2005
Post 2 of 7

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
55 Posts
1 Kudo
Registered: ‎05-14-2012
Post 3 of 7

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*
2,140 Posts
253 Kudos
Registered: ‎04-29-2006
Post 4 of 7

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
55 Posts
1 Kudo
Registered: ‎05-14-2012
Post 5 of 7

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*
2,140 Posts
253 Kudos
Registered: ‎04-29-2006
Post 6 of 7

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
55 Posts
1 Kudo
Registered: ‎05-14-2012
Post 7 of 7

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
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!