fawellp Posted December 1, 2012 Posted December 1, 2012 Do you recommend VBA or Lisp for following project? https://www.elance.com/j/vba-macros-lisp-routine-3d-solid-modelling-autocad/35665239/ Please let me know if you have the time / expertise to compelte the project! VBA Macro or Lisp routine for AutoCAD.docx Quote
fixo Posted December 2, 2012 Posted December 2, 2012 I think Lisp will be more preferable to such task Quote
SEANT Posted December 2, 2012 Posted December 2, 2012 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. Quote
fawellp Posted December 2, 2012 Author Posted December 2, 2012 Thank you fixo/seant that's very useful advice. Quote
fixo Posted December 2, 2012 Posted December 2, 2012 (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 December 2, 2012 by fixo 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.