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!
Solved! Go to Solution.
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.
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).
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?
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.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register