Jump to content

Using Polyline Diet Lisp Routine


Dawg221

Recommended Posts

I have a file from a local GIS Dept and I am trying to reduce the number of polylines in the file. Have not used a Lisp routine previously but found one that I thought would be beneficial, not only with this project but in other aspects of my work. The problem is that I get an

"Error: no function definition: VLAX-CURVE-GETSTARTPOINT" in the command line. IS ANYONE FAMILIAR with the issue or other options to reduce the number of polylines in this file.PLDiet.lsp

Link to comment
Share on other sites

add the line :

(vl-load-com)

right after

(defun C:PLD
 (/ *error* cmde disttemp cidtemp arctemp plinc plsel pl
 pldata ucschanged front 10to42 vinc verts vert1 vert2 vert3)

That should fix it for you.

Link to comment
Share on other sites

As another thought, this will remove excess vertices, not polylines. If you are looking to remove polylines that overlap, try the OVERKILL command.

Link to comment
Share on other sites

As another thought, this will remove excess vertices, not polylines. If you are looking to remove polylines that overlap, try the OVERKILL command.

 

I agree with Commandobill, OVERKILL is a great command, effortless and fast. :beer:

Link to comment
Share on other sites

I have a file from a local GIS Dept and I am trying to reduce the number of polylines in the file. Have not used a Lisp routine previously but found one that I thought would be beneficial, not only with this project but in other aspects of my work. The problem is that I get an

"Error: no function definition: VLAX-CURVE-GETSTARTPOINT" in the command line. IS ANYONE FAMILIAR with the issue or other options to reduce the number of polylines in this file.[ATTACH]55021[/ATTACH]

 

Probably more complicated than you think. Those polylines have data attached like names for street segments. Those names often change, but if you combine the segments to one polyline it can only have one name attached. I use a lisp that joins contour segments which reduces the drawing size a lot. Section of that code:

      (setq ss1 (ssget "X" '((8 . "INDEX,INTER"))))
     (if(eq(getvar "PStyleMode")1)
       (command "_.pedit" "_M" ss1 "" "_J" "0.0" "_Width" "0.5" "") ; Join polylines and set Width to 0.5
       (command "_.pedit" "_M" ss1 "" "_J" "0.0" "") ; Join polylines
     )

Our GIS uses an INDEXANNO layer for the section of index contour they turn off to show the elevation labels. I merge that layer into INDEX first with:

      (if(tblobjname "layer" "INDEXANNO")
       (command "-laymrg" "Name" "INDEXANNO" "" "Name" "INDEX" "Yes")
     )

Lots of other code to set up layer properties etc… Unfortunately no two GIS are set up exactly the same so my code may not help you that much. Just wanted to give you a couple things to consider.

Link to comment
Share on other sites

Thanks Commandobill. Using OVERKILL with the Polyline Diet Lisp got basically what I was looking for and quickly. Now I can adjust the parameters for the prompts to make the contours less jagged.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...