Here is my my script. What am I missing. This Lisp just creates are standard company frame.
I get asked the three questions. Size, Company & Scale then get
Requires an integer between 0 and 2
; error: function cancelled
Enter new value from frame <3>:
(defun c:frame()
(command "osnap" "off")
(command "units" "2" "3" "1" "0" "0" "n")
(command "layer" "m" "title" "")
(command "layer" "m" "note" "")
(command "layer" "m" "dim" "c" "red" "" "")
(command "layeR" "m" "obj" "")
(command "layer" "m" "cen" "c" "red" "" "lt" "center" "" "")
(command "layer" "m" "hid" "c" "green" "" "lt" "hidden" "" "")
(command "layer" "m" "phn" "c" "red" "" "lt" "phantom" "" "")
(command "layer" "m" "hat" "c" "green" "" "")
(command "layer" "s" "title" "")
(command "block" "scale" "0.1,0.1" "0.1,0.1" "")
(command "insert" "scale" "0.1,0.1" "" "" "" "")
(setq size (getstring "\nEnter Dwg Size: [A,B,C,D,E,S,SB]: "))
(setq company (getstring "\Enter Company:"))
(setq scl (getstring "\nEnter Dwg Scale: [16=1/16, 8=1/8, 4=1/4, 2=1/2]: "))
(setq dif 0.375)
(if (= "A" size) (setq X 11))
(if (= "B" size) (setq X 17))
(if (= "C" size) (setq X 22))
(if (= "D" size) (setq X 34))
(if (= "E" size) (setq X 44))
(if (= "SB" size) (setq X 17))
(if (= "S" size) (setq X 8.5))
(if (= "A" size) (setq Y 8.5))
(if (= "B" size) (setq Y 11))
(if (= "C" size) (setq Y 17))
(if (= "D" size) (setq Y 22))
(if (= "E" size) (setq Y 34))
(if (= "SB" size) (setq Y 11))
(if (= "S" size) (setq Y 11))
(setq stp (list 0.0 0.0))
(setq scp (list X 0.0))
(setq tdp (list X Y))
(setq frp (list 0.0 Y))
(command "line" stp scp tdp frp "C")
(setq x1 (- X dif))
(setq y1 (- Y dif))
(setq stb (list dif dif))
(setq scb (list x1 dif))
(setq tdb (list x1 y1))
(setq frb (list dif y1))
(command "line" stb scb tdb frb "C")
(command "insert" "i:/transfer/statn104/titleblk" scb "1" "1" "0" "" "" "" "" "" size "" "" "")
(command "insert" "i:/transfer/statn104/tolerance" scb "1" "1" "0")
(if (= "1" company) (setq la "chanc_title_text"))
(if (= "2" company) (setq la "ob_title_text"))
(if (= "3" company) (setq la "and_title_text"))
(if (= "4" company) (setq la "far_title_text"))
(if (= "5" company) (setq la "chard_title_text"))
(if (= "6" company) (command "Layer" "off" "COMPANY" "") (command "Layer" "on" la ""))
(command "zoom" "e")
(if (= "S" size) (setq tp "a") (setq tp "b"))
(if (= "S" size) (setq blk "") (if (= "A" size) (setq blk "i:/transfer/statn104/revblka") (setq blk "i:/transfer/statn104/revblk")))
(if (= "SB" size) (setq blk "") ())
(if (= "S" size) (command "insert" "i:/transfer/statn104/revdate" scb "1" "1" "0" "") ())
(if (= "SB" size) (command "insert" "i:/transfer/statn104/revdate" scb "1" "1" "0" "") ())
(if (= "b" tp) (command "insert" blk scb "1" "1" "0" "" "" "" "" "" "" "" "" "" "" "insert" "I:/TRANSFER/STATN104/dist" scb "1" "1" "0"))
(setq txt (STRCAT "1:" SCL))
(command "text" "0.1,0.1" ".0625" "0" txt "")
(IF (= "S" size) (command "Erase" "W" "1.88,1.51" "3.86,1.76" "") ())
(IF (= "SB" size) (command "Erase" "W" "10.38,1.51" "12.37,1.76" "") ())
(IF (= "SB" size) (IF (= "1" company) (command "Erase" "9.125,1.625" "") ()) ())
(command "zoom" "e" "scale" "all" "" stp scl "zoom" "e")
(command "dimtxt" ".125")
(command "dimexe" ".125")
(command "dimasz" ".125")
(command "dimcen" "-.09")
(command "dimdec" "3")
(command "textsize" ".125")
(command "dimscale" scl)
(command "dimaso" "off")
(command "ucsicon" "off")
)
Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.