Active2 years, 10 months ago
I am trying to select all polylines of a specific layer and then join them with the normal autocad _JOIN command. For some reason i just cant get it to work.
You can convert geometry of spline to a polyline or an arc in AutoCAD with “Polyline Edit” or PEDIT command. This feature does not convert Polyline to spline or arc rather it gives them all the properties like anchor points and geometry keeping object type as Polyline. You can convert Line to Polyline using “Polyline Edit” tool of AutoCAD, using this tool you can also convert an arc or spline into a polyline. However, you can’t convert circle, ellipse and elliptical arc into a polyline using this tool. Polyline.JoinEntities requires the given entities to be other, unclosed Polyline or Polyline2d, Line, and/or Arc entities, which share common start or end points. To handle the 3D polylines, you have to convert them to lines/2D polylines (of course all the entities must be in the same plane). Mar 15, 2018 How to Convert Arc to Polyline in AutoCAD 2018 2.How to Use Pedit command to convert Arc to Polyline 3. How to Use Join option in Pedit command.
The selectionset is properly found as i could loop through it and change the color of the polyline (just did that for testing purpose)
What am i missing/doing wrong here?
Smir
SmirSmir
3 Answers
if anyone still cares about that this was the end result i came up with in the endi save all entities into a list of a class that has entity, startpoint and endpoint of the polylines saved
then i compare if start and endpoints of the elements in list match and join them with entity.join()
Arc To Polyline
SmirSmir
the editor command seems to be different from the client join
as workaround i am using the following now:
i am not 100% happy with it but well, that's what i have to go with for now.
SmirSmir
The right way to do that (if you are using a version of AutoCAD >= 2013) is to use the
Polyline.JoinEntities
method.Don't forget to read the doc :
Polyline.JoinEntities requires the given entities to be other, unclosed Polyline or Polyline2d, Line, and/or Arc entities, which share common start or end points.
Autocad Polyline And Arc Won't Join
To handle the 3D polylines, you have to convert them to lines/2D polylines (of course all the entities must be in the same plane).
There is a sample here: http://adndevblog.typepad.com/autocad/2012/05/joining-2d-3d-polylines.html
Maxence
Polyline In Autocad
Maxence11.1k44 gold badges4040 silver badges6262 bronze badges