- UID
- 525
- 积分
- 3148
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-14
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
用程序自动生成带属性的图框(标题栏)一例
- [font=courier]
- (defun c:test ()
- (load "lsplib")
- (vl-cmdf "ucs" "w" "")
- (setq index (load_dialog (findfile "dial.dcl")))
- (if (not (new_dialog "dtbl" index))(exit))
- (imagep)
- (action_tile "accept" "(setq pa (get_tile "pa"))
- (setq to (get_tile "to"))
- (setq e (get_tile "e"))
- (setq p (get_tile "p"))
- (setq l (get_tile "l"))
- (done_dialog)")
- (action_tile "cancel" "(exit)")
- (start_dialog)
- (unload_dialog index)
- (setvar "osmode" 0)
- (if (= (getvar "tilemode") 1)(setvar "tilemode" 0))
- (mlayer "title_block" "cyan" "continous")
- (setq rp1 '(0.0 0.1))
- (if (= p "1")(setq rp2 '(7.08 10.9))(setq rp2 '(10.95 7.3)))
- (setq rtop (list (/ (car rp2) 2)(+ (cadr rp2) 0.03125)))
- (vl-cmdf "rectangle" rp1 rp2)
- (vl-cmdf "rectangle" (polar rtop pi 0.6) "@1.2,0.1")
- (vl-cmdf "text" "s" "romand" "j" "mc" (polar rtop (/ pi 2) 0.05) 0.07 0 "IF IN DOUBT -ASK!" "")
- (vl-cmdf "chprop" (entlast) "" "c" 6 "")
- (vl-cmdf "rectangle" rp2 "@-2.83,-0.315") ;;top num box
- (vl-cmdf "line" "@2.611,0" "@0,0.315" "")
- (vl-cmdf "text" "romand" "j" "tl" "@0.02,-0.02" 0.06 0 "REV")
- (vl-cmdf "-style" "romand" "" "" 1.2 "" "" "" "")
- (vl-cmdf "text" "j" "tl" "@-2.611,0" 0.06 0 "NUMBER")
- (vl-cmdf "ucs" "n" rp1 "")
- (vl-cmdf "line" '(0 0.315) "@2.55,0" "" "line" "@1.7,0" "@2.83,0" "line" "@-0.219,0" "@0,-0.315" "")
- (vl-cmdf "line" '(2.55 0) "@0,0.748" "line" "@-2.55,0" "@4.25,0" "")
- (vl-cmdf "line" '(4.25 0) "@0,1.693" "@2.83,0" "")
- (vl-cmdf "line" '(0 0.748) "@4.25,0" "")
- (vl-cmdf "line" '(0.85 0.748) "@0,0.63" "")
- (vl-cmdf "array" (entlast) "" "r" 1 4 0.85 "")
- (vl-cmdf "line" '(0 0.9055) "@3.4,0" "")
- (vl-cmdf "rectangle" '(0 1.063) '(7.08 1.378))
- (vl-cmdf "line" '(6.062 1.063) "@0,0.63" "" "line" "@-1.182,0" "@0,-0.63" "" "line" "@0.482,0" "@0,0.315" "")
- (vl-cmdf "line" '(4.25 1.5355) "@2.83,0" "" "line" "@-0.308,0.1575" "@0,-0.315" "")
- (vl-cmdf "line" '(4.565 1.378) "@0,0.315" "")
- (vl-cmdf "-style" "romand" "" "" 1 "" "" "" "")
- (vl-cmdf "text" "j" "mc" '(1.275 0.26) 0.052 0 "This drawing is the Property of PARKER HANNIFIN Crop.")
- (vl-cmdf "text" "j" "mc" '(1.275 0.17) 0.052 0 "Any use or reproduction except by expressed")
- (vl-cmdf "text" "j" "mc" '(1.275 0.08) 0.052 0 "permission of PARKER HANNIFIN Crop. is Hereby Prohibited.")
- (parkerlogo '(0 0.428))
- (vl-cmdf "text" "s" "romand" "j" "mc" '(0.425 0.37) 0.06 0 "Fluid Connectors" "")
- (vl-cmdf "change" (entlast) "" "p" "c" 6 "")
- (vl-cmdf "-style" "romand" "" "" 1.1 "" "" "" "")
- (vl-cmdf "text" "s" "romand" "j" "mc" '(1.73 0.67) 0.055 0 "Parker Hannifin (N.Z) Ltd.")
- (vl-cmdf "text" "j" "mc" '(1.73 0.58) 0.055 0 "PO Box 14-906 Panmure")
- (vl-cmdf "text" "j" "mc" '(1.73 0.49) 0.055 0 "3 Bowden Road Mt. Wellington")
- (vl-cmdf "text" "j" "mc" '(1.73 0.4) 0.055 0 "Auckland, New Zealand")
- (vl-cmdf "text" "j" "tl" '(6.881 0.295) 0.06 0 "REV")
- (vl-cmdf "-style" "romand" "" "" 1 "" "" "" "")
- (vl-cmdf "text" "j" "tl" '(2.58 0.55) 0.06 0 "MUST CONFORM")
- (vl-cmdf "text" "j" "tl" '(2.58 0.45) 0.06 0 "TO HS-99,ES-99")
- (vl-cmdf "text" "j" "tl" '(2.58 0.35) 0.06 0 "ANGLE %%P1/2%%D")
- (vl-cmdf "text" "j" "tl" '(2.58 0.17) 0.06 0 "DIMENSIONS IN")
- (vl-cmdf "text" "j" "mc" '(5.121 1.2205) 0.18 0 "A4")
- (vl-cmdf "change" (entlast) "" "p" "c" 6 "")
- (setvar "cecolor" "bylayer")
- (vl-cmdf "-style" "romand" "" "" 1.2 "" "" "" "")
- (vl-cmdf "text" "j" "tl" '(2.57 0.728) 0.06 0 "TOLERANCE" "")
- (vl-cmdf "text" "j" "mc" '(0.4252 0.8267) 0.06 0 "MATERIAL" "")
- (vl-cmdf "text" "j" "mc" "@0.85,0" 0.06 0 "STOCK SIZE" "")
- (vl-cmdf "text" "j" "mc" "@0.85,0" 0.06 0 "HEAT TREAT" "")
- (vl-cmdf "text" "j" "mc" "@0.85,0" 0.06 0 "FINISH" "")
- (vl-cmdf "text" "j" "tl" '(3.41 1.043) 0.06 0 "SCALE" "")
- (vl-cmdf "text" "j" "tl" '(0.02 1.358) 0.06 0 "DRAWN" "")
- (vl-cmdf "text" "j" "tl" "@0.85,0" 0.06 0 "DATE" "")
- (vl-cmdf "text" "j" "tl" "@0.85,0" 0.06 0 "CHECKED" "")
- (vl-cmdf "text" "j" "tl" "@0.85,0" 0.06 0 "DATE" "")
- (vl-cmdf "text" "j" "tl" "@0.85,0" 0.06 0 "APPROVED" "")
- (vl-cmdf "text" "j" "tl" "@0.85,0" 0.06 0 "DATE" "")
- (project '(5.712 1.2205))
- (vl-cmdf "text" "j" "mc" '(4.4095 1.4568) 0.06 0 "ECN" "")
- (vl-cmdf "text" "j" "mc" "@0.315,0" 0.06 0 "REV""")
- (vl-cmdf "text" "j" "mc" "@0.748,0" 0.06 0 "DESCRIPTION" "")
- (vl-cmdf "text" "j" "mc" "@0.9448,0" 0.06 0 "DATE" "")
- (vl-cmdf "text" "j" "mc" "@0.5085,0" 0.06 0 "BY" "")
- (cond
- ((= pa "1")
- (vl-cmdf "text" "j" "tl" '(4.27 0.295) 0.06 0 "NUMBER")
- (vl-cmdf "text" "j" "tl" "@0,0.748" 0.06 0 "TITLE" ""))
- ((= to "1")
- (vl-cmdf "line" '(4.565 0) "@0,0.315" "")
- (vl-cmdf "text" "j" "tl" '(4.27 0.295) 0.06 0 "HAND")
- (vl-cmdf "text" "j" "tl" "@0.315,0" 0.06 0 "NUMBER")
- (vl-cmdf "text" "j" "tl" '(4.27 0.728) 0.06 0 "TITLE" "")
- (vl-cmdf "line" '(4.25 0.748) "@2.83,0" "" "line" "@0,0.1575" "@-2.83,0" "")
- (vl-cmdf "line" '(4.88 0.748) "@0,0.315" "" "line" "@1.57,0" "@0,-0.315" ""
- "line" "@0.315,0" "@0,0.315" "")
- (vl-cmdf "text" "j" "mc" '(4.565 0.8268) 0.06 0 "PART NO.")
- (vl-cmdf "text" "j" "mc" "@0,0.1575" 0.06 0 "ENDSTYLE")
- (vl-cmdf "text" "j" "mc" '(6.6075 0.8268) 0.06 0 "REV")
- (vl-cmdf "text" "j" "mc" "@0,0.1575" 0.06 0 "REV"))
- );c
- (vl-cmdf "-style" "romand" "" "" 1 "" "" "" "")
- (vl-cmdf "ucs" "w" "")
- (setvar "cecolor" "6")
- (entmake '((0 . "block")(410 . "Layout1")(2 . "*U")(70 . 1)(10 0 0 0)))
- (setq blkn (entmake '((0 . "ENDBLK"))))
- (entmake (append '((0 . "INSERT")(10 0 0 0)(66 . 1)) (list (cons 2 blkn))))
- (entmake '((0 . "ATTRIB")(1 . "K3D78-30-16C-AU")(2 . "Part Num")(7 . "Romand")
- (10 0 0 0)(11 5.65 0.14 0)(40 . 0.15)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(1 . "-")(2 . "Rev")(7 . "Romand")
- (10 0 0 0)(11 6.972 0.16 0)(40 . 0.08)(70 . 0)(72 . 1)))
- (cond
- ((= to "1")
- (entmake '((0 . "ATTRIB")(1 . "INTERNAL RECESS")(2 . "Title1")(7 . "Romand")
- (10 0 0 0)(11 5.68 0.68 0)(40 . 0.13)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(1 . "FRONT BARBS")(2 . "Titledown")(7 . "Romand")
- (10 0 0 0)(11 5.59 0.45 0)(40 . 0.13)(70 . 0)(72 . 1))))
- ((= to "0")
- (entmake '((0 . "ATTRIB")(1 . "")(2 . "Titletop")(7 . "Romand")
- (10 0 0 0)(11 5.81 0.95 0)(40 . 0.14)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(1 . "")(2 . "Title1")(7 . "Romand")
- (10 0 0 0)(11 5.68 0.75 0)(40 . 0.14)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(1 . "")(2 . "Titledown")(7 . "Romand")
- (10 0 0 0)(11 5.59 0.5 0)(40 . 0.14)(70 . 0)(72 . 1))))
- );c
- (entmake '((0 . "ATTRIB")(1 . "")(2 . "Ecn") (7 . "Romand")
- (10 0 0 0)(11 4.408 1.675 0)(40 . 0.06)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(1 . "-")(2 . "Erev")(7 . "Romand")
- (10 0 0 0)(11 4.72 1.675 0)(40 . 0.06)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(40 . 0.06)(1 . "")(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 5.468 1.675 0)(2 . "Description")(70 . 0)))
- (entmake '((0 . "ATTRIB")(1 . "10/06/03")(2 . "Date")(7 . "Romand")
- (10 0 0 0)(40 . 0.06)(72 . 1)(11 6.41 1.675 0)(70 . 0)))
- (entmake '((0 . "ATTRIB")(40 . 0.06)(1 . "")(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 6.92 1.675 0)(2 . "By")(70 . 0)))
- (entmake '((0 . "ATTRIB")(1 . "JOHN.S")(40 . 0.08)(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 0.425 1.24 0)(2 . "Drawn")(70 . 0)))
- (entmake '((0 . "ATTRIB")(1 . "09/06/03")(40 . 0.08)(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 1.275 1.24 0)(2 . "Date")(70 . 0)))
- (entmake '((0 . "ATTRIB")(1 . "") (40 . 0.08)(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 2.125 1.24 0)(2 . "Checked")(70 . 0)))
- (entmake '((0 . "ATTRIB")(1 . "")(40 . 0.08)(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 2.975 1.24 0)(2 . "Date")(70 . 0)))
- (entmake '((0 . "ATTRIB")(1 . "")(40 . 0.08)(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 3.825 1.24 0)(2 . "Approved")(70 . 0)))
- (entmake '((0 . "ATTRIB")(40 . 0.08)(1 . "05/06/03")(7 . "Romand")
- (10 0 0 0)(11 4.565 1.24 0.0)(2 . "Date")(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(40 . 0.06)(1 . "316L")(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 0.425 1.045 0)(2 . "Material")(70 . 0)))
- (entmake '((0 . "ATTRIB")(40 . 0.06)(1 . "36mm AF HEX")(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 1.275 1.045 0)(2 . "Size")(70 . 0)))
- (entmake '((0 . "ATTRIB")(40 . 0.06)(1 . "-")(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 2.125 1.045 0)(2 . "Heat")(70 . 0)))
- (entmake '((0 . "ATTRIB")(40 . 0.06)(1 . "-")(7 . "Romand")
- (72 . 1)(10 0 0 0)(11 2.975 1.045 0)(2 . "Finish")(70 . 0)))
- (entmake '((0 . "ATTRIB")(40 . 0.12)(1 . "NTS")(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 4.0 0.9 0)(2 . "Scale")(70 . 0)))
- (entmake '((0 . "ATTRIB")(40 . 0.21)(1 . "INCH")(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 6.57 1.23 0)(2 . "Unit")(70 . 0)))
- (entmake '((0 . "ATTRIB")(1 . "X.X%%P0.04")(2 . "x.x")(7 . "Romand")
- (10 0 0 0)(11 3.85 0.59 0)(40 . 0.06)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(1 . "X.XX%%P0.008")(2 . "x.xx")(7 . "Romand")
- (10 0 0 0)(11 3.85 0.49 0)(40 . 0.06)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(40 . 0.06)(1 . "X.XXX%%P0.004")(7 . "Romand")
- (10 0 0 0)(11 3.85 0.39 0)(2 . "x.xxx")(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(40 . 0.06)(1 . "INCH")(7 . "Romand")
- (10 0 0 0)(72 . 1)(11 3.4 0.21 0)(2 . "UNIT")(70 . 0)))
- (if (<= (car rp2) 7.08)
- (progn
- (entmake '((0 . "ATTRIB")(1 . "K3D78-30-16C-AU")(2 . "Part Num")(7 . "Romand")
- (10 0 0 0)(11 5.65 10.63 0)(40 . 0.15)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(1 . "-")(2 . "Rev")(7 . "Romand")
- (10 0 0 0)(11 6.972 10.65 0)(40 . 0.08)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(1 . "K3D78-30-16C-AU")(2 . "Part Num")(7 . "Romand")
- (10 7.15 2.0 0)(11 7.15 0.8 0)(40 . 0.15)(70 . 0)(72 . 5))))
- (progn
- (entmake '((0 . "ATTRIB")(1 . "K3D78-30-16C-AU")(2 . "Part Num")(7 . "Romand")
- (10 0 0 0)(11 5.65 7.03 0)(40 . 0.15)(70 . 0)(72 . 1)))
- (entmake '((0 . "ATTRIB")(40 . 0.08)(1 . "-")(7 . "Romand")
- (10 0 0 0)(11 6.962 7.05 0)(2 . "Rev")(70 . 0)(72 . 1))))
- );i
- (if (= to "1")
- (progn
- (entmake '((0 . "ATTRIB")(10 0 0 0)(40 . 0.1)(1 . "T")(7 . "Romand")
- (72 . 1)(11 4.4075 0.18 0)(2 . "Hand")(70 . 0)))
- (entmake '((0 . "ATTRIB")(10 0 0 0)(40 . 0.07)(1 . "K9170-6-6-AU")(7 . "Romand")
- (72 . 1)(11 5.665 1.054 0)(2 . "Part No")(70 . 0)))
- (entmake '((0 . "ATTRIB")(10 0 0 0)(40 . 0.07)(1 . "-")(7 . "Romand")
- (72 . 1)(11 6.9225 1.054 0)(2 . "Rev")(70 . 0)))
- (entmake '((0 . "ATTRIB")(10 0 0 0)(40 . 0.07)(1 . "D83,31-6")(7 . "Romand")
- (72 . 1)(11 5.665 0.897 0)(2 . "Endstyle")(70 . 0)))
- (entmake '((0 . "ATTRIB")(10 0 0 0)(40 . 0.07)(1 . "a")(7 . "Romand")
- (72 . 1)(11 6.9225 0.897 0)(2 . "Rev")(70 . 0))))
- );I
- (entmake '((0 . "SEQEND")))
- (if (> (car rp2) 7.08)(vl-cmdf "move" (entlast) "" '(0 0) '(3.87 0) ""))
- (vl-cmdf "-style" "romand" "" "" 1.0 "" "" "" "")
- (setvar "cecolor" "bylayer")
- (setvar "osmode" 37)
- (princ)
- );defun
- [/font]
|
|