ktbjx Posted October 28, 2019 Share Posted October 28, 2019 (edited) (defun c:layerElev ( / ss clayer i pline elevation layername ) (setq ss (ssget '((0 . "LWPOLYLINE")))) (setq clayer (getvar "CLAYER")) (if ss (progn (setq i -1) (repeat (sslength ss) (setq i (1+ i) pline (ssname ss i) elevation (cdr (assoc 38 (entget pline))) ) (cond ( (<= elevation 669.99999999) (setq layername "NO_ELEV") ) ( (= (rem (fix elevation) 2) 1) (setq layername (strcat "CONTOUR_EL" (itoa (1+ (fix elevation))))) ) ( t (setq layername (strcat "CONTOUR_EL" (itoa (fix elevation)))) ) ) (command "_.layer" "_make" layername "") (command "_.change" pline "" "_Properties" "_LAyer" layername "") ) ) ) (setvar "CLAYER" clayer) (princ) ) I use this to put polylines on each layer by elevation. thanks to this site... Now my question is, is it possible to make this work on all polylines? like 3dPolyline, 2dPolyline, Polyline, and the one I am using now, which is LWPolyline. so that I will not have to explode the polylines, and then join them again. because sometimes, when there are too much polylines to explode and join, my unit crashes, and its time consuming to do it over again. so I am asking for help... Edited October 28, 2019 by ktbjx Quote Link to comment Share on other sites More sharing options...
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.