I can not seem to get this to work. Can anyone please help me out?
Thank you,
Brad
(defun c:column ( in_base in_size / Base Top Size BaseHeight TopHeight BasePoint TopPoint ColWdtB ColWdtT )
;;; in_base argument #28 #32 or 0
;;; in_size argument 10 12 14 16 20
;;; Use like this Command : (c:column "#32" "14" ) or Command : (c:column "0" "16" )
;;; ----------- # ---------- ---------- 0 ----------
;;; SQUARE COLUMN TOP ROUND COULUMN TOP
;;; 13 15 17 19 10.75 12.75 14.75 16.75 <- Top width
;;; | | | | | | | |
;;; | | | | 8 10 12 14
;;; 6.25 8.25 10.25 12.25 | | | | <- Column width
;;; | | | | 9 11 13 15
;;; | | | | | | | |
;;; 10 12 14 16 12 14 16 18 <- Base width
;;; 28INCH SQUARE COLUMN BASE ROUND COLUMN BASE
;;; 32INCH SQUARE COLUMN BASE ---------- 0 ----------
;;; ----------- # ----------
;; You have to make 12 base block and 8 top block
(cond ;; Base Block name Top Block name
((and (= in_base "#28" ) (= in_size "10" )) (setq Base "28SQUAREBASE10" Top "SQUARETOP13" ColWdtB 6.25 ColWdtT 6.25 ) )
((and (= in_base "#28" ) (= in_size "12" )) (setq Base "28SQUAREBASE12" Top "SQUARETOP15" ColWdtB 8.25 ColWdtT 8.25 ) )
((and (= in_base "#28" ) (= in_size "14" )) (setq Base "28SQUAREBASE14" Top "SQUARETOP17" ColWdtB 10.25 ColWdtT 10.25 ) )
((and (= in_base "#28" ) (= in_size "16" )) (setq Base "28SQUAREBASE16" Top "SQUARETOP19" ColWdtB 12.25 ColWdtT 12.25 ) )
((and (= in_base "#32" ) (= in_size "10" )) (setq Base "32SQUAREBASE10" Top "SQUARETOP13" ColWdtB 6.25 ColWdtT 6.25 ) )
((and (= in_base "#32" ) (= in_size "12" )) (setq Base "32SQUAREBASE12" Top "SQUARETOP15" ColWdtB 8.25 ColWdtT 8.25 ) )
((and (= in_base "#32" ) (= in_size "14" )) (setq Base "32SQUAREBASE14" Top "SQUARETOP17" ColWdtB 10.25 ColWdtT 10.25 ) )
((and (= in_base "#32" ) (= in_size "16" )) (setq Base "32SQUAREBASE16" Top "SQUARETOP19" ColWdtB 12.25 ColWdtT 12.25 ) )
((and (= in_base "0" ) (= in_size "12" )) (setq Base "ROUNDBASE12" Top "ROUNDTOP10" ColWdtB 9 ColWdtT 8 ) )
((and (= in_base "0" ) (= in_size "14" )) (setq Base "ROUNDBASE14" Top "ROUNDTOP12" ColWdtB 11 ColWdtT 10 ) )
((and (= in_base "0" ) (= in_size "16" )) (setq Base "ROUNDBASE16" Top "ROUNDTOP14" ColWdtB 13 ColWdtT 12 ) )
((and (= in_base "0" ) (= in_size "18" )) (setq Base "ROUNDBASE18" Top "ROUNDTOP16" ColWdtB 15 ColWdtT 14 ) )
(t (princ "Wrong combination" ) )
)
(cond
((= in_base "#28" ) (setq BaseHeight 2'-4 ) ) ; <-- Sorry I do not know how to enter Your stupid numbers, You must do it
((= in_base "#32" ) (setq BaseHeight 2'-8 ) ) ; <-- Sorry I do not know how to enter Your stupid numbers, You must do it
((= in_base "0" ) (setq BaseHeight 4 1/2 ) ) ; <-- Sorry I do not know how to enter Your stupid numbers, You must do it
(t nil)
)
(cond
((= in_base "#28" ) (setq TopHeight 1'-0 ) ) ; <-- Sorry I do not know how to enter Your stupid numbers, You must do it
((= in_base "#32" ) (setq TopHeight 1'-0 ) ) ; <-- Sorry I do not know how to enter Your stupid numbers, You must do it
((= in_base "0" ) (setq TopHeight 5 ) )
(t nil)
)
(setq BasePoint (getpoint "Digitize BasePoint : " ) )
(setq TopPoint (getpoint "Digitize TopPoint : " ) )
(setq TopPoint (list (car BasePoint ) (cadr TopPoint ) (caddr BasePoint )) )
(command "._insert" Base BasePoint "1" "1" "0" )
(command "._insert" Top TopPoint "1" "1" "0" )
;;; Beware of osmode snap
(command "._line"
(list (- (car BasePoint ) (/ ColWdtB 2.0 )) (+ (cadr BasePoint ) BaseHeight ) (caddr BasePoint ) )
(list (- (car TopPoint ) (/ ColWdtT 2.0 )) (- (cadr TopPoint ) TopHeight ) (caddr TopPoint ) )
""
)
(command "._line"
(list (+ (car BasePoint ) (/ ColWdtB 2.0 )) (+ (cadr BasePoint ) BaseHeight ) (caddr BasePoint ) )
(list (+ (car TopPoint ) (/ ColWdtT 2.0 )) (- (cadr TopPoint ) TopHeight ) (caddr TopPoint ) )
""
)
(princ)
)