tahta07 0 Posted February 10 (edited) Hello. In my drawing, there are many blocks around and it says how many floors they are inside. I want to extrude these blocks. But since they are so numerous, it takes a long time to do it one by one. I'm looking for a lisp to extrude these blocks according to the numbers written in them. It also works to select polylines based on the numbers inside I'm sorry for my bad english. http://prntscr.com/yz55au Edited February 10 by tahta07 Quote Share this post Link to post Share on other sites
tahta07 0 Posted February 12 here is the dwg Drawing1.dwg Quote Share this post Link to post Share on other sites
tahta07 0 Posted February 12 6 hours ago, BIGAL said: Post a dwg. I posted Quote Share this post Link to post Share on other sites
ronjonp 248 Posted February 12 Here's a start: (defun c:foo (/ i n p s sp) ;; RJP » 2021-02-12 (if (setq s (ssget ":L" '((0 . "*POLYLINE")))) (progn (setq sp (vlax-ename->vla-object (cdr (assoc 330 (entget (ssname s 0)))))) (vl-cmdf "_.UNDO" "Be") (setvar 'cmdecho 0) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq p nil) (repeat (fix (setq i (vlax-curve-getendparam e))) (setq p (cons (vlax-curve-getpointatparam e i) p)) (setq i (1- i)) ) (if (and (setq i (ssget "_WP" p '((0 . "TEXT")))) (> (setq n (atof (cdr (assoc 1 (entget (setq i (ssname i 0))))))) 0) ) ;; Vl extrusion is not as editable? (progn ;; (setq r (car (vlax-invoke sp 'addregion (list (vlax-ename->vla-object e))))) ;; (vlax-invoke sp 'addextrudedsolid r (* 3 n) 0.) (vl-catch-all-apply 'vl-cmdf (list "_.extrude" e "" (* 3 n))) ) ) ) (vl-cmdf "_.UNDO" "End") (setvar 'cmdecho 1) ) ) (princ) ) 1 Quote Share this post Link to post Share on other sites
tahta07 0 Posted April 7 Thank you sir its work Quote Share this post Link to post Share on other sites
ronjonp 248 Posted April 7 47 minutes ago, tahta07 said: Thank you sir its work Glad to help Quote Share this post Link to post Share on other sites