Jump to content

Recommended Posts

Posted

I think Lisp will be more preferable to such task

Posted

I agree with fixo; VBA has questionable long term viability. Stick with Lisp of those two.

 

 

 

Or, at least specify VB.NET and/or the other .NET variants.

Posted

Thank you fixo/seant that's very useful advice.

Posted (edited)

Here you will be started, just a scratch, sorry

 
(defun C:ww(/ )
(setvar "cmdecho" 0)
(setvar "selectionpreview" 3)
(command "_ucsicon" "_off" )
(command "_ucsfollow" 0 )

(setvar "osmode" 1)
(setq pt (getpoint "\nSpecify new origin point of UCS: "))
(command "_zoom" "_c" pt (/ (distance (getvar "extmax")(getvar "extmin"))2.))
(command "_-view" "_seiso")
(setvar "osmode" 512)
(setq px (getpoint "\nSpecify point on positive portion of X-axis: ")) 
(setq py (getpoint "\nSpecify point on positive-Y portion of the UCS XY plane: ")) 
(command "_ucs" "_3p" pt px py)
(setvar "osmode" 512)
;;dummy values used: 
(setq wp (getpoint pt "\nPick next point: "))
(setq w1 (list (car wp)(cadr wp)(+ (caddr wp) 750.))
w2 (list (+ (car w1)1350.)(cadr w1)(caddr w1))
w3 (list (car w2)(cadr w2)(+ (caddr w2) 2100.))
w4 (list (car w1)(cadr w1)(caddr w3)))
(setq wall (ssname (ssget "_C" pt wp (list (cons 0 "3dsolid")))0))

(command "_box" "_non" w1 "_non" (list (car w2)(+ (cadr w2)10000.)(caddr w2)) 1350.0);;10000. is dummy value to subtract box
(setq tmpsol (entlast))
(command "_subtract" wall "" tmpsol "" )
(command "_ucsicon" "_on" )
(command "_ucs" "_p")
(setvar "cmdecho" 1)
(princ)
)

Edited by fixo

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