erki Posted February 23, 2024 Posted February 23, 2024 Hi, Im looking for a lisp where when I'll be able to choose multiple polylines and be able to choose Ltype Gen ON without having to click every single polyline. The plines have been delivered to me and need to be put in a certain layer and linestyle for other usage. (got 1000's of lines) Thank you, Eric Quote
SLW210 Posted February 23, 2024 Posted February 23, 2024 Are there some you do not want to enable linetype generation? For all Plines in a drawing, just Qselect>Polyline>Linetype generation>= Equals>No>OK, then go to properties and scroll down to Miscellaneous>Linetype Generation>Enabled. Are you looking for something to put them on the layers and linestyles as well? Maybe post a .dwg and specific instructions. 1 Quote
Crank Posted February 24, 2024 Posted February 24, 2024 Many releases ago there was this commando PLUD . I believe it was a lisp and part of the express tools. Maybe it's still working (don't know). Quote
erki Posted February 27, 2024 Author Posted February 27, 2024 @SLW210 Wow thank you. Makes me feel so stupid when something is so easy. Quote
SLW210 Posted February 27, 2024 Posted February 27, 2024 I sometimes forget to use Qselect myself for a lot of things, even though I use it often. Quote
SLW210 Posted February 28, 2024 Posted February 28, 2024 If you could post a sample before/after .dwg and precise instructions, a LISP might be possible to do it all. Quote
McFly Posted March 27 Posted March 27 (edited) Hi, I believe this may work. replace VA_RAIL with the required layer name, if multiple layers are needed, separate with a comma. (vl-load-com) (defun EnableLinetypeGeneration () (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq modelSpace (vla-get-ModelSpace doc)) ;; Select all polylines on the "VA_RAIL" layer (setq ss (ssget "X" '((8 . "VA_RAIL") (0 . "LWPOLYLINE")))) (if ss (progn (setq i 0) (repeat (sslength ss) (setq ent (ssname ss i)) (setq plineObj (vlax-ename->vla-object ent)) ;; Enable linetype generation (vla-put-LinetypeGeneration plineObj :vlax-true) (vla-Update plineObj) (setq i (1+ i)) ) (princ "\nLinetype generation enabled for selected polylines.") ) (princ "\nNo polylines found on layer VA_RAIL.") ) (princ) ) Trevor Edited March 28 by SLW210 Added Code Tags! Quote
SLW210 Posted March 28 Posted March 28 Please use Code Tags for your Code. (<> in the editor toolbar) Quote
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.