Jump to content

Recommended Posts

Posted (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 by tahta07
Posted
6 hours ago, BIGAL said:

Post a dwg.

I posted

Posted

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)
)

 

  • Thanks 1
  • 1 month later...
Posted
47 minutes ago, tahta07 said:

Thank you sir its work 😍🤩

Glad to help 🍻

  • Like 1
  • 5 months later...
Posted
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

Posted

Post a sample where it does not work. It should work unless there's something funky with the geometry.

Posted

Extrude a 3dpoly ?? Not sure can be done unless its a single planar surface and maybe set UCS. Think of a TIN surface. 

Posted
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. 

 

2021-09-17_17-52-30.gif

Posted (edited)

Bricscad V20 would not let me, maybe doing something wrong.

Edited by BIGAL

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...