Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

CONVERTPOLY problem

autoid374ceb4990
Advocate

CONVERTPOLY problem

autoid374ceb4990
Advocate
Advocate

I have a R14 DWG file that has about 400 POLYLINEs.  I am trying to convert them to LWPOLYLINEs using CONVERTPOLY.  When I select any of the polylines I get a message saying "0 polylines converted".  If I draw a new POLYLINE in this drawing the CONVERTPOLY command works properly and converts it to a LWPOLYLINE.  This drawing was created by a non Autodesk application.  I have attached a drawing with one of the plines.  I have tried opening the drawing with PLINETYPE set to 0,1,2 and no change.  Any suggestions as to how to convert these plines to LWPOLYLINEs?   And yes I am using R14.

0 Me gusta
Responder
1.285 Vistas
24 Respuestas
Respuestas (24)

Patchy
Mentor
Mentor

Explode then Pedit, join

 

AllenJessup
Mentor
Mentor

Good advice from @Patchy . But I'd skip Pedit and use the Join command. It has a few less steps.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Me gusta

Patchy
Mentor
Mentor

My 2008 still needs to do Pline then Join, I'm pretty sure R14 would do the same.

Newer versions can Join.

This is from my 2008:

Command: join
Select source object:
Select lines to join to source: 1 found
Select lines to join to source:
0 lines joined to source, 1 object discarded from operation

AllenJessup
Mentor
Mentor

OK. I saw it was an R14 file. But for some reason I thought the OP was opening an old file in a more current version. In R14 your answer is the best.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Me gusta

autoid374ceb4990
Advocate
Advocate

Yes, explode, then pedit, join works but I have over 400 plines in this drawing, and they are all pretty long.  The example in my attached drawing has over 900 vertices so doing this by hand is not feasible.  I tried the PEDIT,join method and it works, and after joining the CONVERTPOLY command works properly. And once again, if I draw a new POLYLINE in this drawing the CONVERTPOLY command works properly and converts it from a LWPOLYLINE to aPOLYLINE and back again.  So there must be something different about the POLYLINE in the attached drawing that keeps CONVERTPOLY form working properly.

0 Me gusta

Patchy
Mentor
Mentor

So there must be something different about the POLYLINE in the attached drawing that keeps CONVERTPOLY form working properly.

Looks like contours, they were created by civil package weren't they? exported from AEC Contour objects?

 

0 Me gusta

AllenJessup
Mentor
Mentor

As far as the workaround goes. Use the Multiple option in Pedit and select every line. Every line that shares a vertex with another line will be joined. Creating the 400± polylines at once.

 

Command: PEDIT

Select polyline or [Multiple]: m

Select objects: Specify opposite corner: 17 found

Select objects:

Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype gen/Reverse/Undo]: J

Join Type = Extend
Enter fuzz distance or [Jointype] <0.0000>:

13 segments added to 4 polylines

 

That created 4 individual polylines.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Me gusta

AllenJessup
Mentor
Mentor

I think I grabbed the wrong drawing. Checking now.

 

Yes. grabbed the wrong drawing. I'll see what I can find out.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Me gusta

AllenJessup
Mentor
Mentor

It looks like it's a 3D polyline. I see what can be done.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Me gusta

AllenJessup
Mentor
Mentor

I can't find a way to convert it to a 2D polyline in AutoCAD. I have options in the AEC Collection and a 3rd party app.

You might want to try the Lisp routine found on the Cadalyst site HERE.  Do a Google search to find other options.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Me gusta

Kent1Cooper
Consultant
Consultant

Yes, the issue is that it's a 3D Polyline, which CONVERTPOLY doesn't like even though it's flat / planar.

 

You can use the 3P2Z command, defined in Pline3Dto2DmidZ.lsp, >here<.  It worked for me in your sample drawing, and it accepts selection of multiple 3D Polylines.

Kent Cooper, AIA

autoid374ceb4990
Advocate
Advocate
: Did you try CONVERTPOLY on the POLYLINE in my drawing?

Thanks all who have offered suggestions, but I am using R14 and the lisp files will not work for me.  Just wondering if someone with a newer version would load the drawing that I posted and let me know if CONVERTPOLY will convert the POLYLINE to a LWPOLYLINE?

0 Me gusta

Kent1Cooper
Consultant
Consultant

@autoid374ceb4990 wrote:
: Did you try CONVERTPOLY on the POLYLINE in my drawing? ....

Yes, in Acad2020, and it did not accept it for conversion, because it won't accept 3D Polylines at all.

Kent Cooper, AIA
0 Me gusta

Kent1Cooper
Consultant
Consultant

@autoid374ceb4990 wrote:
... I am using R14 and the lisp files will not work ....

Do you really mean Release 14 [from back in the 1990s?], not AutoCAD 2014?  AutoLisp was surely there in the latter, but maybe not the former (I wasn't dabbling in it yet back then).

Kent Cooper, AIA
0 Me gusta

autoid374ceb4990
Advocate
Advocate

Yes, R14 from way back in ancient times.  I was in the engineering/land surveying business and wrote my own software to use in the business.  I never upgraded because R14 would do everything I needed, and I did not care for AutoDesk's later licensing policies.  The later (visual?) LISP will not run on my R14. Anyway I have attached another drawing that has two polylines.   The red pline is one that I created and LISTs as a POLYLINE with the same elevation at each vertex.  The blue polyline is a copy of the red polyline and I converted it with CONVERTPOLY to a LWPOLYLINE.  If I draw a polyline with the 3DPOLY command, you are correct in that it will not convert. The previous drawing that I posted was not created by an AutoDesk product, and I am trying to figure out how to convert it to LWPOLYLINES without having to explode, pedit, join.

0 Me gusta

Kent1Cooper
Consultant
Consultant

@autoid374ceb4990 wrote:

.... I am trying to figure out how to convert it to LWPOLYLINES without having to explode, pedit, join.


Am I correct that the JOIN command didn't exist yet back at Release 14?  That [in later versions] would at least avoid one step [after Exploding, all the pieces could be JOINed collectively into as many Polylines as they constitute, without the PEDIT command].

Kent Cooper, AIA
0 Me gusta

autoid374ceb4990
Advocate
Advocate

Correct, the JOIN command does not exist in R14.  What I really do not understand is why the CONVERTPOLY command works in drawings that I have created in R14, but the drawing I attached in my original post does not work. I tried creating a DXF (D1) file of the polyline that does not work and a DXF (D2) file of the polyline that does works with CONVERTPOLY.  Then I erased the ENTITIES section of D1 and copied the ENTITIES section  of D2 into D1.  That did not work, so there must be some other setting in D1 that is causing the problem.

 

I posted something in the ARX Customization forum about how to create a LWPOLYLINE using 'C' code in ARX, which would solve my problem, but have had no replies so far.

0 Me gusta

autoid374ceb4990
Advocate
Advocate

OK, for what it is worth, I think I have found the reason that the polylines in my problem drawing will not convert using CONVERTPOLY.  I made a dxf file containing one of the problem plines and one of the problem plines that had been exploded and then reconstructed with PEDIT.  The problem pline contained a group code 70 (bit coded polyline flag) and when I removed this code in the dxf and loaded it back into AutoCad, the CONVERTPOLY command works properly.  I am not sure how to correct this problem, but as long as I don't run into drawings from the same source, I hope I don't have to.

AllenJessup
Mentor
Mentor

I used to deal with drawings like that back in R9 or 12. The Explode and Pedit using Multiple works without too much fuss.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Me gusta