Dawg221 Posted July 28, 2015 Share Posted July 28, 2015 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 Quote Link to comment Share on other sites More sharing options...
Commandobill Posted July 29, 2015 Share Posted July 29, 2015 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. Quote Link to comment Share on other sites More sharing options...
Commandobill Posted July 29, 2015 Share Posted July 29, 2015 As another thought, this will remove excess vertices, not polylines. If you are looking to remove polylines that overlap, try the OVERKILL command. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted July 29, 2015 Share Posted July 29, 2015 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. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted July 29, 2015 Share Posted July 29, 2015 I moved your thread to the AutoLISP, Visual LISP & DCL Forum. Quote Link to comment Share on other sites More sharing options...
tombu Posted July 29, 2015 Share Posted July 29, 2015 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. Quote Link to comment Share on other sites More sharing options...
Dawg221 Posted July 29, 2015 Author Share Posted July 29, 2015 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. Quote Link to comment Share on other sites More sharing options...
Commandobill Posted July 29, 2015 Share Posted July 29, 2015 Glad it all worked out for you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.