tahta07 Posted February 10, 2021 Posted February 10, 2021 (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, 2021 by tahta07 Quote
tahta07 Posted February 12, 2021 Author Posted February 12, 2021 6 hours ago, BIGAL said: Post a dwg. I posted Quote
ronjonp Posted February 12, 2021 Posted February 12, 2021 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
ronjonp Posted April 7, 2021 Posted April 7, 2021 47 minutes ago, tahta07 said: Thank you sir its work Glad to help 1 Quote
tahta07 Posted September 17, 2021 Author Posted September 17, 2021 On 4/7/2021 at 5:30 PM, ronjonp said: Glad to help Sir could you help me again? Lisp works very well but it doesn't exturude 3DPOLYLINE How can I exturude both 3dpolyline and polyline Quote
ronjonp Posted September 17, 2021 Posted September 17, 2021 Post a sample where it does not work. It should work unless there's something funky with the geometry. Quote
BIGAL Posted September 17, 2021 Posted September 17, 2021 Extrude a 3dpoly ?? Not sure can be done unless its a single planar surface and maybe set UCS. Think of a TIN surface. Quote
ronjonp Posted September 17, 2021 Posted September 17, 2021 13 minutes ago, BIGAL said: Extrude a 3dpoly ?? Not sure can be done unless its a single planar surface and maybe set UCS. Think of a TIN surface. Quote
BIGAL Posted September 17, 2021 Posted September 17, 2021 (edited) Bricscad V20 would not let me, maybe doing something wrong. Edited September 17, 2021 by BIGAL 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.