.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to create a lightweight polyline using existing lines and arcs

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
mindofcat
2675 Views, 6 Replies

How to create a lightweight polyline using existing lines and arcs

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!

6 REPLIES 6
Message 2 of 7
djonio
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

Message 3 of 7
mindofcat
in reply to: djonio

Thanks Dennis

Message 4 of 7
_gile
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
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 5 of 7
mindofcat
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!!!

Message 6 of 7
_gile
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
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 7 of 7
mindofcat
in reply to: _gile

Thanks, just accessed the download link...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost