Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reduce Polyline points

23 REPLIES 23
SOLVED
Reply
Message 1 of 24
Anonymous
24759 Views, 23 Replies

Reduce Polyline points

Anonymous
Not applicable

Hi, 

I realize there are many posts about this but they all seem to be old and none of them are working for me. 

I am running AutoCAD 2019 fully up to date. I have attached a sample file. 

The program I use to convert a raster file to vector works very well at created an accurate conversion. Unfortunately this seems to mean that it creates a TON of nodes. 

If someone knows a way to reduce the amount of vertices in the polylines, I am all ears!

 

Thanks

Sandro

0 Likes

Reduce Polyline points

Hi, 

I realize there are many posts about this but they all seem to be old and none of them are working for me. 

I am running AutoCAD 2019 fully up to date. I have attached a sample file. 

The program I use to convert a raster file to vector works very well at created an accurate conversion. Unfortunately this seems to mean that it creates a TON of nodes. 

If someone knows a way to reduce the amount of vertices in the polylines, I am all ears!

 

Thanks

Sandro

23 REPLIES 23
Message 2 of 24
Patchy
in reply to: Anonymous

Patchy
Mentor
Mentor

PLdiet.lsp from Kent works just fine.

 

Capture.JPG

PLdiet.lsp from Kent works just fine.

 

Capture.JPG

Message 3 of 24
Anonymous
in reply to: Patchy

Anonymous
Not applicable

Hi, 

This seems to be exactly what I am looking for. Can you please explain to me how you did this?

0 Likes

Hi, 

This seems to be exactly what I am looking for. Can you please explain to me how you did this?

Message 4 of 24
Patchy
in reply to: Anonymous

Patchy
Mentor
Mentor
Accepted solution

Go to Cadalyst and download the PLdiet.lsp, Use apload command and load it, after that use PLD command.

There are a few options in this routine for you to pick for the polylines.

http://cadtips.cadalyst.com/linear-objects/polyline-diet

Go to Cadalyst and download the PLdiet.lsp, Use apload command and load it, after that use PLD command.

There are a few options in this routine for you to pick for the polylines.

http://cadtips.cadalyst.com/linear-objects/polyline-diet

Message 5 of 24
Kent1Cooper
in reply to: Patchy

Kent1Cooper
Consultant
Consultant

@Patchy wrote:

Go to Cadalyst and download the PLdiet.lsp....


 

Thanks for the recommendation and link.  The comment there is because I hadn't included a little function -- (vl-load-com) -- that some people need [I don't because it's taken care of elsewhere, so I haven't always remembered to include it], and unfortunately they're not accepting comments any more, so I can't fix it there, but here's a version with that added, so you shouldn't have that Commenter's problem.

Kent Cooper, AIA


@Patchy wrote:

Go to Cadalyst and download the PLdiet.lsp....


 

Thanks for the recommendation and link.  The comment there is because I hadn't included a little function -- (vl-load-com) -- that some people need [I don't because it's taken care of elsewhere, so I haven't always remembered to include it], and unfortunately they're not accepting comments any more, so I can't fix it there, but here's a version with that added, so you shouldn't have that Commenter's problem.

Kent Cooper, AIA
Message 6 of 24
Anonymous
in reply to: Patchy

Anonymous
Not applicable

@Patchy wrote:

Go to Cadalyst and download the PLdiet.lsp, Use apload command and load it, after that use PLD command.

There are a few options in this routine for you to pick for the polylines.

http://cadtips.cadalyst.com/linear-objects/polyline-diet


ok so i think i got this downloaded properly because I now have a new command that was previously not available to me. Can you please tell me your input selection that gave you this output? I am messing around with it and cant seem to get it to work for me.

0 Likes


@Patchy wrote:

Go to Cadalyst and download the PLdiet.lsp, Use apload command and load it, after that use PLD command.

There are a few options in this routine for you to pick for the polylines.

http://cadtips.cadalyst.com/linear-objects/polyline-diet


ok so i think i got this downloaded properly because I now have a new command that was previously not available to me. Can you please tell me your input selection that gave you this output? I am messing around with it and cant seem to get it to work for me.

Message 7 of 24
Patchy
in reply to: Anonymous

Patchy
Mentor
Mentor

Use 0.05 for distance

Capture.JPG

After that use Pedit, Multiple and Join.

Capture 1.JPG

Use 0.05 for distance

Capture.JPG

After that use Pedit, Multiple and Join.

Capture 1.JPG

Message 8 of 24
Anonymous
in reply to: Patchy

Anonymous
Not applicable

Awesome! This works great. I previously had zero experience with .lsp 

 

I am going to be using this so often. I am very thankful to you for showing me this and to the creators!

 

One more question. I noticed the command was no longer available when I closed the file and then reopened it. Is there a way to have this command permanently available to me without having to use the appload command?

0 Likes

Awesome! This works great. I previously had zero experience with .lsp 

 

I am going to be using this so often. I am very thankful to you for showing me this and to the creators!

 

One more question. I noticed the command was no longer available when I closed the file and then reopened it. Is there a way to have this command permanently available to me without having to use the appload command?

Message 9 of 24
Patchy
in reply to: Anonymous

Patchy
Mentor
Mentor

Yes, after the Appload command, look for the Suitcase and add that lsp in there.

Yes, after the Appload command, look for the Suitcase and add that lsp in there.

Message 10 of 24
Anonymous
in reply to: Patchy

Anonymous
Not applicable

it works! perfect thank you.

it works! perfect thank you.

Message 11 of 24
Anonymous
in reply to: Kent1Cooper

Anonymous
Not applicable

I'm totally lost here. I have downloaded that PLDiet.lsp file that you have posted but I have no idea where to put it and how to get it to run. Can you please help me out with this. 

THanks 

0 Likes

I'm totally lost here. I have downloaded that PLDiet.lsp file that you have posted but I have no idea where to put it and how to get it to run. Can you please help me out with this. 

THanks 

Message 12 of 24
Kent1Cooper
in reply to: Anonymous

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... I have downloaded that PLDiet.lsp file that you have posted but I have no idea where to put it and how to get it to run. ....



In a drawing, use the APPLOAD command, navigate to where you saved the file, select it and Load it.  Close out of that, and use the command name PLD.

Kent Cooper, AIA
0 Likes


@Anonymous wrote:

.... I have downloaded that PLDiet.lsp file that you have posted but I have no idea where to put it and how to get it to run. ....



In a drawing, use the APPLOAD command, navigate to where you saved the file, select it and Load it.  Close out of that, and use the command name PLD.

Kent Cooper, AIA
Message 13 of 24
Anonymous
in reply to: Kent1Cooper

Anonymous
Not applicable

Ok I have tried this but it does nothing. Maybe because Im using AutoCad LT2020? I typed appload into the command bar but it says invalid command. Not sure what to do 

0 Likes

Ok I have tried this but it does nothing. Maybe because Im using AutoCad LT2020? I typed appload into the command bar but it says invalid command. Not sure what to do 

Message 14 of 24
Kent1Cooper
in reply to: Anonymous

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... it does nothing. Maybe because Im using AutoCad LT2020? ….


Exactly.  LT does not have AutoLisp capability.

Kent Cooper, AIA
0 Likes


@Anonymous wrote:

.... it does nothing. Maybe because Im using AutoCad LT2020? ….


Exactly.  LT does not have AutoLisp capability.

Kent Cooper, AIA
Message 15 of 24
3dwannab
in reply to: Kent1Cooper

3dwannab
Advocate
Advocate

@Kent1Cooper wrote:

@Patchy wrote:

Go to Cadalyst and download the PLdiet.lsp....


 

Thanks for the recommendation and link.  The comment there is because I hadn't included a little function -- (vl-load-com) -- that some people need [I don't because it's taken care of elsewhere, so I haven't always remembered to include it], and unfortunately they're not accepting comments any more, so I can't fix it there, but here's a version with that added, so you shouldn't have that Commenter's problem.


 

I was wondering if there was a way around the error when using this inside block editor.

 

Thanks.

 

** UCS command not allowed in block editor. **

 

0 Likes


@Kent1Cooper wrote:

@Patchy wrote:

Go to Cadalyst and download the PLdiet.lsp....


 

Thanks for the recommendation and link.  The comment there is because I hadn't included a little function -- (vl-load-com) -- that some people need [I don't because it's taken care of elsewhere, so I haven't always remembered to include it], and unfortunately they're not accepting comments any more, so I can't fix it there, but here's a version with that added, so you shouldn't have that Commenter's problem.


 

I was wondering if there was a way around the error when using this inside block editor.

 

Thanks.

 

** UCS command not allowed in block editor. **

 

Message 16 of 24
Kent1Cooper
in reply to: 3dwannab

Kent1Cooper
Consultant
Consultant

@3dwannab wrote:
....

I was wondering if there was a way around the error when using this inside block editor.

** UCS command not allowed in block editor. **

 

Unfortunately, I don't think so.  PLD doesn't try to change the UCS unless  the Polyline in question is not in or parallel to the current Coordinate System.  In that case, it must  change the UCS to work right, because its operations depend on (angle) and (distance) functions, which work projected onto the current construction plane.  So if that plane is not at least parallel to  the plane of the Polyline [the Polyline doesn't actually need to lie on  it], it won't give correct results.

 

[But when you can  use it, use the updated version >here<.]

 

I suggest that you Insert such a Block somewhere in isolation, EXPLODE it, run PLD on the Polyline, and then re-define back into the same Block name with the svelte new Polyline.

Kent Cooper, AIA
0 Likes


@3dwannab wrote:
....

I was wondering if there was a way around the error when using this inside block editor.

** UCS command not allowed in block editor. **

 

Unfortunately, I don't think so.  PLD doesn't try to change the UCS unless  the Polyline in question is not in or parallel to the current Coordinate System.  In that case, it must  change the UCS to work right, because its operations depend on (angle) and (distance) functions, which work projected onto the current construction plane.  So if that plane is not at least parallel to  the plane of the Polyline [the Polyline doesn't actually need to lie on  it], it won't give correct results.

 

[But when you can  use it, use the updated version >here<.]

 

I suggest that you Insert such a Block somewhere in isolation, EXPLODE it, run PLD on the Polyline, and then re-define back into the same Block name with the svelte new Polyline.

Kent Cooper, AIA
Message 17 of 24
3dwannab
in reply to: Kent1Cooper

3dwannab
Advocate
Advocate

Thanks. I was wondering what had happened the cadalyst site where I couldn't comment.

I was doing it that way but thought I'd ask you if the ucs command was heavily required.

 

I don't have time to look at it but it could be possible to copy the polylines into a new drawing, close that and paste back into the block editor at the same position replacing the old lines.

 

0 Likes

Thanks. I was wondering what had happened the cadalyst site where I couldn't comment.

I was doing it that way but thought I'd ask you if the ucs command was heavily required.

 

I don't have time to look at it but it could be possible to copy the polylines into a new drawing, close that and paste back into the block editor at the same position replacing the old lines.

 

Message 18 of 24
3dwannab
in reply to: Kent1Cooper

3dwannab
Advocate
Advocate

I don't know where I got the last PLD but it had reporting, in the end, showing what had changed, like so.

 

137-->51 (-62.77% )
17-->8 (-52.94% )
10-->6 (-40.00% )
3 polylines simplified.

I've added that back in for anyone that wants it.

 

 

0 Likes

I don't know where I got the last PLD but it had reporting, in the end, showing what had changed, like so.

 

137-->51 (-62.77% )
17-->8 (-52.94% )
10-->6 (-40.00% )
3 polylines simplified.

I've added that back in for anyone that wants it.

 

 

Message 19 of 24
chloeleyba8NWHJ
in reply to: Anonymous

chloeleyba8NWHJ
Explorer
Explorer

Hi all, I'm new to this forum. but have many years of CAD experience. I recently switched over to CAD for MAC, and wow there are a lot of differences. With that said, I'm trying to get the PLDiet.lsp to work on MAC. It loads up fine and even shows the prompts to run this function. But in the end I get an error message. I'll show......

 

 

Command: pld
Maximum distance between non-collinear vertices to straighten <0.05>:
Maximum change in direction to straighten <15>:
Retain or Straighten arc segments [R/S] <R>:
Select LWPolylines to put on a diet, or press Enter to select all:
Select objects: 0 found
Select objects: Specify opposite corner: 16 found, 16 total
Select objects:
Error: no function definition: VLAX-CURVE-GETSTARTPOINT
Cannot invoke (command) from *error* without prior call to (*push-error-using-command*).
Converting (command) calls to (command-s) is recommended.

 

Any help appreciated. 😊

0 Likes

Hi all, I'm new to this forum. but have many years of CAD experience. I recently switched over to CAD for MAC, and wow there are a lot of differences. With that said, I'm trying to get the PLDiet.lsp to work on MAC. It loads up fine and even shows the prompts to run this function. But in the end I get an error message. I'll show......

 

 

Command: pld
Maximum distance between non-collinear vertices to straighten <0.05>:
Maximum change in direction to straighten <15>:
Retain or Straighten arc segments [R/S] <R>:
Select LWPolylines to put on a diet, or press Enter to select all:
Select objects: 0 found
Select objects: Specify opposite corner: 16 found, 16 total
Select objects:
Error: no function definition: VLAX-CURVE-GETSTARTPOINT
Cannot invoke (command) from *error* without prior call to (*push-error-using-command*).
Converting (command) calls to (command-s) is recommended.

 

Any help appreciated. 😊

Message 20 of 24

Kent1Cooper
Consultant
Consultant

@chloeleyba8NWHJ wrote:

....

Error: no function definition: VLAX-CURVE-GETSTARTPOINT

....


Message 5 is about exactly that.  If those (vl...) functions in the updated PLDiet there don't work in the Mac version, there may be nothing you can do.  The routine uses them for critical purposes, and I'd have to think about whether there's a different way to accomplish them.  The one listed in that error message could be, but the (vl-remove...) and (vl-remove-if...) and (vl-remove-if-not...) ones later would probably require a major change in approach and a lot of re-write.

Kent Cooper, AIA
0 Likes


@chloeleyba8NWHJ wrote:

....

Error: no function definition: VLAX-CURVE-GETSTARTPOINT

....


Message 5 is about exactly that.  If those (vl...) functions in the updated PLDiet there don't work in the Mac version, there may be nothing you can do.  The routine uses them for critical purposes, and I'd have to think about whether there's a different way to accomplish them.  The one listed in that error message could be, but the (vl-remove...) and (vl-remove-if...) and (vl-remove-if-not...) ones later would probably require a major change in approach and a lot of re-write.

Kent Cooper, AIA

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report