Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;&l0O;(s16.6H
- (defun set_arch ()
- (setq is_engr nil is_arch T sscale 1)
- (setvar "lunits" 4)
- (start_list "arch_list")
- (mapcar 'add_list archvals)
- (end_list)
- )
- (defun set_engr ()
- (setq is_engr T is_arch nil sscale 1)
- (setvar "lunits" 4)
- (start_list "arch_list")
- (mapcar 'add_list engrvals)
- (end_list)
- )
- (defun sel_disc (which)
- (cond ((= which "rad_1")(setq scr "none" dis "a"))
- ((= which "rad_2")(setq scr "microsoft-lay" dis "e" ))
- ((= which "rad_3")(setq scr "cochran-eng-lay" dis "c"))
- ((= which "rad_4")(setq scr "cochran-security-lay" dis "m"))
- ((= which "rad_5")(setq scr "microsoft-security-lay" dis "p"))
- ((= which "rad_6")(setq scr "comm-lay" dis "s"))
- ((= which "rad_7")(setq scr "audio-visual-lay" dis "f"))
- )
- )
- (defun sel_sheet (which)
- (setq sht_siz (nth (atoi which) sheetvals))
- (setq sheet_x (nth (atoi which) sheet_x_vals))
- (setq sheet_y (nth (atoi which) sheet_y_vals))
- )
- (defun sel_sscale (which)
- (if (= is_arch T)(setq sscale_list archscale)(setq sscale_list engrscale))
- (setq sscale (nth (atoi which ) sscale_list))
- )
- (defun sel_curr_style ()
- (setq ofildia (getvar "filedia"))
- (setvar "filedia" 0)
- (if (/= (strcase (getvar "textstyle"))(strcase curr_style ) )
- (progn
- (if (= (strcase curr_style) "ARCH")
- (COMMAND "_.style" "arch" "verdana" 0 1.0 0 "" "" "")
- (COMMAND "_.style" "verdana" "verdana" 0 1.0 0 "" "" "")
- )
- )
- (princ)
- )
- (setvar "filedia" ofildia)
- (setq curr_style nil)
- )
- (defun make_setup ()
- (setvar "userr1" SSCALE)
- (setvar "ltscale" (* SSCALE 0.375))
- ;(setvar "dimscale" 1)
- (setvar "textsize" (* SSCALE 0.09375))
- (setvar "gridunit" (list (* 0.5 SSCALE) (* 0.5 SSCALE)))
- (setvar "snapunit" (list (* 0.015 SSCALE) (* 0.015 SSCALE)))
- (setvar "dimasz" (* SSCALE 0.125))
- (setvar "dimtxt" (* SSCALE 0.09375))
- (setvar "gridmode" 1)
- (setvar "coords" 1)
- (setvar "blipmode" 0)
- (setvar "limmin" (list 0.0 0.0))
- (setvar "limmax" (list (* SSCALE sheet_x) (* SSCALE sheet_y)))
- (setvar "limcheck" 0)
- (done_dialog 1)
- )
- (defun drop_out ()
- (setq sscale nil dis nil mnu nil is_cancel T is_arch nil is_engr nil
- sht_siz nil sheet_x nil sheet_y nil)
- (done_dialog 0)
- )
- ;--------------------------------------------------------------------
- ;DDzstart
- ;--------------------------------------------------------------------
- (defun c:ddzstart ()
- ; load zstart.dcl
- (setq zstart_dcl_id (load_dialog "ddzstart.dcl"))
- (if (< zstart_dcl_id 0) (exit))
- (if (not (new_dialog "zstart" zstart_dcl_id)) (exit))
- (setq archvals (list " 1\"=1\""
- " 1/2\"=1'"
- " 1/4\"=1'"
- " 3/16\"=1'"
- " 1/8\"=1'"
- " 1/16\"=1'"
- " 1/32\"=1'"
- " 3/32\"=1'"
- " 1\"=1'"
- ))
- (setq archscale (list 1 24 48 64 96 192 384 128 12 ))
- (setq engrscale (list 6000 2400 1200 720 600 480 360 240 120 60 ))
- (setq engrvals (list "1\"=500'"
- "1\"=200'"
- "1\"=100'"
- "1\"=60'"
- "1\"=50'"
- "1\"=40'"
- "1\"=30'"
- "1\"=20'"
- "1\"=10'"
- "1\"=5'"
- ))
- (setq sheetvals (list "42x30"
- "36x24"
- "48x35.5"
- "8.5x11"
- "11x8.5"
- "11x17"
- "17x11"
- ))
- (setq sheet_x_vals (list 42 36 48 8.5 11 11 17 ))
- (setq sheet_y_vals (list 29.75 23.75 35.5 11 8.5 17 11 ))
- (start_list "arch_list")
- (mapcar 'add_list archvals)
- (end_list)
- (start_list "sheet_size_list")
- (mapcar 'add_list sheetvals)
- (end_list)
- ;initialize discipline - verdana,sscale 96, sheet 24x36
- (if (/= (getenv "D") nil)
- (progn
- (cond
- ((= (strcase (getenv "D")) "A")(set_tile "rad_1" "1")(sel_disc "rad_1" ))
- ((= (strcase (getenv "D")) "C")(set_tile "rad_2" "1")(set_tile "rad_9" "1")
- (set_engr) (sel_disc "rad_2" ))
- ((= (strcase (getenv "D")) "E")(set_tile "rad_3" "1")(sel_disc "rad_3" ))
- ((= (strcase (getenv "D")) "M")(set_tile "rad_4" "1")(sel_disc "rad_4" ))
- ((= (strcase (getenv "D")) "S")(set_tile "rad_5" "1")(sel_disc "rad_5" ))
- ((or
- (= (strcase (getenv "D")) "S")
- (= (strcase (getenv "D")) "MH") (set_tile "rad_6" "1")(sel_disc "rad_6" )))
- ((= (strcase (getenv "D")) "F")(set_tile "rad_7" "1")(sel_disc "rad_7" ))
- ((= (strcase (getenv "D")) "P")(set_tile "rad_8" "1")(sel_disc "rad_8" ))
- )
- )
- (sel_disc "rad_1") ;sets default to verdana
- )
- (sel_sheet "0") ;indices into lists for sheet_size and SSCALE
- (set_arch)
- (sel_sscale "1")
- ;initialize style to verdana-9.7.93 chged to fs default
- (setq curr_style "arch")
- (action_tile "rad_9" "(set_engr)")
- (action_tile "rad_8" "(set_arch)")
- (action_tile "arch" "(setq curr_style $key)" )
- (action_tile "verdana" "(setq curr_style $key)" )
- (action_tile "rad_set" "(sel_disc $value)")
- (action_tile "sheet_size_list" "(sel_sheet $value)")
- (action_tile "arch_list" "(sel_sscale $value)")
- (action_tile "accept" "(make_setup)")
- (action_tile "cancel" "(drop_out)")
- (start_dialog)
- (if (= (get_tile "rad_9" ) "1") (set_engr))
- (if (= (get_tile "rad_8" ) "1") (set_arch))
- (unload_dialog zstart_dcl_id)
- (if (/= is_cancel T)
- (progn
- (setq is_arch nil is_engr nil )
- (sel_curr_style)
- (load (strcat "start" dis))
- (COMMAND "_.script" scr)
- )
- ; (COMMAND "_.script" "none")
- )
- (setq is_cancel nil)
- (COMMAND "_.snap" "on")
- (command "_.zoom" "a" (getvar "limmin")(getvar "limmax"))
- (PRINC)
- (PRINC)
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement