1. Panagiotis Mavrogiorgos
  2. Autocad

Commits

Panagiotis Mavrogiorgos  committed c0ad5d2

Initial commit

  • Participants
  • Branches default

Comments (0)

Files changed (39)

File Lisp/command_aliases.lsp

View file
+;---------------------------------------------------------------------------
+; Defines some custom shortcuts
+;---------------------------------------------------------------------------
+
+(defun C:a ()       (command "_.line"))
+(defun C:aa ()      (command "_.pline"))
+(defun C:c ()       (command "_.copy"))
+(defun C:cc ()      (command "_.circle"))
+(defun C:d ()       (command "_.offset"))
+(defun C:e ()       (command "_.erase"))  ; Not needed!
+(defun C:f ()       (command "_.move"))
+(defun C:ff ()      (command "_.fillet"))
+(defun C:q ()       (command "_.dimlinear"))
+(defun C:qc ()      (command "_.dimcontinue"))
+(defun C:qq ()      (command "_.dimaligned"))
+(defun C:r ()       (command "_.rotate"))
+(defun C:rr ()      (command "_.mirror"))
+(defun C:s ()       (command "_.stretch"))
+(defun C:v ()       (command "_.pasteclip"))
+(defun C:w ()       (command "_.matchprop"))
+(defun C:xh ()      (command "_.xline" "H"))
+(defun C:xv ()      (command "_.xline" "V"))

File Lisp/stl/README.TXT

View file
+INSTALLATION
+To install this release of STEEL, a directory called STL has to be created on 
+your local Hard disk drive in the root directory,
+
+  i.e. C:\STL typically.
+
+The self executing zip file is copied to this directory and then the program 
+files are extracted by a double-click on STL.EXE.
+
+The files are now ready for use by AutoCAD 14 and STL.LSP can be loaded via the 
+AutoCAD 14 "Tools - Load Application"  pull-down menu.
+
+Once loaded, STEEL is started by typing STL at the keyboard, or an icon can be 
+added to the toolbars as described in AutoCAD customisation manuals.
+
+Please read the "INFO" section of the program for any further information. 

File Lisp/stl/STL.LSP

View file
+;*********STL.LSP****************A TIME-SAVING UTILITY******************************************************************
+; Indentation by Panagiotis Mavrogiorgos
+;*********ERROR RECOVERY
+(defun *error* (msg)
+    (STL_VAR_RESET)
+    (setq *error* m:err
+        m:err nil
+    )
+    (princ)
+)
+;***********************************************************************************************************************
+(defun STL_END (/   sect            dcl_id      weight
+                    thick           sched       view            size
+                    setout          toe_fh      max_x           max_y
+                    I_LIST          I_WT_LIST   RSC_LIST        ERSA_LIST
+                    ERSA_THK_LIST   URSA_LIST   URSA_THK_LIST   CHS_LIST
+                    CHS_THK_LIST    SHS_LIST    SHS_THK_LIST    RHS_LIST
+                    RHS_THK_LIST    STEEUC_LIST STEEUC_WT_LIST  STEEUB_LIST
+                    STEEUB_WT_LIST  RTEE_LIST   RTEE_WT_LIST    STL_INFO_LST)
+    (setq m:err *error*)
+    (STL_VAR_SET)
+    (if (> (setq dcl_id (load_dialog "c:/stl/stl")) 0)
+        (progn
+            (if (new_dialog "stl" dcl_id)
+                (progn
+                    (foreach tile	'("UB" "UC" "CUB" "CUC" "UBP" "RSJ" "HD")
+                        (action_tile tile "(setq sect $key)(STL_I)"))
+                    (foreach tile	'("IPE" "IPN" "HE" "HL" "HX")
+                        (action_tile tile "(setq sect $key)(STL_SI)"))
+                    (action_tile "ERSA" "(setq sect $key)(STL_ERSA)")
+                    (action_tile "URSA" "(setq sect $key)(STL_URSA)")
+                    (action_tile "RSC" "(setq sect $key)(STL_RSC)")
+                    (action_tile "U" "(setq sect $key)(STL_U)")
+                    (action_tile "UPN" "(setq sect $key)(STL_UPN)")
+                    (action_tile "PFC" "(setq sect $key)(STL_PFC)")
+                    (action_tile "CHS" "(setq sect $key)(STL_CHS)")
+                    (action_tile "SHS" "(setq sect $key)(STL_SHS)")
+                    (action_tile "RHS" "(setq sect $key)(STL_RHS)")
+                    (action_tile "STEEUC" "(setq sect $key)(STL_STEEUC)")
+                    (action_tile "STEEUB" "(setq sect $key)(STL_STEEUB)")
+                    (action_tile "RTEE" "(setq sect $key)(STL_RTEE)")
+                    (action_tile "PIPE" "(setq sect $key)(STL_PIPE)")
+                    (action_tile "FASTENERS" "(STL_FASTENERS)")
+                    (action_tile "STL_UNITS" "(STL_LAYER)")
+                    (action_tile "BACKMARKS" "(STL_BMKS)")
+                    (action_tile "STL_INFO" "(STL_INFO)")
+                    (action_tile "STL_cancel" "(done_dialog 1)")))))
+    (start_dialog)
+    (unload_dialog dcl_id)
+    (STL_SELECT)
+)
+;***********************************************************************************************************************
+(defun STL_BMKS	()
+    (if
+        (new_dialog "stl_backmarks" dcl_id)
+        (progn
+            (action_tile "STL_RSC_BMK" "(STL_BMK_RSC)")
+            (action_tile "STL_RSA_BMK" "(STL_BMK_RSA)")
+            (action_tile "STL_BEAMS_BMK" "(STL_BMK_BEAMS)")
+            (action_tile "STL_BMK_BACK" "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_BMK_RSC ()
+    (mode_tile "STL_RSC_BMK" 1)
+    (mode_tile "STL_RSA_BMK" 1)
+    (mode_tile "STL_BEAMS_BMK" 1)
+    (start_image "BMK_IMAGE")
+    (setq max_x (dimx_tile "BMK_IMAGE"))
+    (setq max_y (dimy_tile "BMK_IMAGE"))
+    (slide_image 0 0 max_x max_y "c:/stl/stl(RSCBMK)")
+    (end_image)
+)
+;***********************************************************************************************************************
+(defun STL_BMK_RSA ()
+    (mode_tile "STL_RSC_BMK" 1)
+    (mode_tile "STL_RSA_BMK" 1)
+    (mode_tile "STL_BEAMS_BMK" 1)
+    (start_image "BMK_IMAGE")
+    (setq max_x (dimx_tile "BMK_IMAGE"))
+    (setq max_y (dimy_tile "BMK_IMAGE"))
+    (slide_image 0 0 max_x max_y "c:/stl/stl(RSABMK)")
+    (end_image)
+)
+;***********************************************************************************************************************
+(defun STL_BMK_BEAMS ()
+    (mode_tile "STL_RSC_BMK" 1)
+    (mode_tile "STL_RSA_BMK" 1)
+    (mode_tile "STL_BEAMS_BMK" 1)
+    (start_image "BMK_IMAGE")
+    (setq max_x (dimx_tile "BMK_IMAGE"))
+    (setq max_y (dimy_tile "BMK_IMAGE"))
+    (slide_image 0 0 max_x max_y "c:/stl/stl(BEAMSBMK)")
+    (end_image)
+)
+;***********************************************************************************************************************
+(defun STL_SELECT ()
+    (cond
+        ((and 
+            (or (= sect "UB")
+                (= sect "UC")
+                (= sect "CUB")
+                (= sect "CUC")
+                (= sect "UBP")
+                (= sect "RSC")
+                (= sect "PFC")
+                (= sect "RSJ")
+                (= sect "IPE")
+                (= sect "IPN")
+                (= sect "HD")
+                (= sect "HE")
+                (= sect "HL")
+                (= sect "HX")
+                (= sect "U")
+                (= sect "UPN"))
+            (or (= view "SIDE") 
+                (= view "BACK"))
+            (I_SIDE)))
+        ;*********
+        ((and 
+            (or (= sect "UB")
+                (= sect "UC")
+                (= sect "CUB")
+                (= sect "CUC")
+                (= sect "UBP")
+                (= sect "RSJ")
+                (= sect "IPE")
+                (= sect "IPN")
+                (= sect "HD")
+                (= sect "HE")
+                (= sect "HL")
+                (= sect "HX")
+                (= sect "RTEE")
+                (= sect "STEEUB")
+                (= sect "STEEUC"))
+            (= view "PLAN")
+            (I_PLAN)))
+        ;*********
+        ((and 
+            (or (= sect "UB")
+                (= sect "UC")
+                (= sect "CUB")
+                (= sect "CUC")
+                (= sect "UBP")
+                (= sect "IPE")
+                (= sect "HD")
+                (= sect "HE")
+                (= sect "HL")
+                (= sect "HX"))
+            (= view "XSECT")
+            (I_XSECT)))
+        ;*********
+        ((and 
+            (or (= sect "RSJ") 
+                (= sect "IPN"))
+            (= view "XSECT"))
+        (RSJ_XSECT))
+        ;*********
+        ((and 
+            (or (= sect "RSC") 
+                (= sect "U") 
+                (= sect "UPN"))
+            (= view "XSECT"))
+        (RSC_XSECT))
+        ;*********
+        ((and 
+            (= sect "PFC")
+            (= view "XSECT"))
+        (PFC_XSECT))
+        ;*********
+        ((and 
+            (or (= sect "RSC")
+                (= sect "PFC")
+                (= sect "U")
+                (= sect "UPN"))
+            (= view "PLAN"))
+        (RSA_SIDE))
+        ;*********
+        ((and 
+            (or (= sect "ERSA")
+                (= sect "URSA")
+                (= sect "RTEE")
+                (= sect "STEEUC")
+                (= sect "STEEUB"))
+            (or (= view "SIDE")
+                (= view "SIDE_LONG")
+                (= view "SIDE_SHORT")
+                (= view "TSIDE"))
+            (RSA_SIDE)))
+        ;*********
+            ((and 
+                (or (= sect "ERSA") 
+                    (= sect "URSA"))
+                (or (= view "XSECT_SHORT_LEFT")
+                    (= view "XSECT_SHORT_RIGHT")
+                    (= view "XSECT_LONG_LEFT")
+                    (= view "XSECT_LONG_RIGHT")
+                    (= view "XSECT_L")
+                    (= view "XSECT_R"))
+                (RSA_XSECT)))
+        ;*********
+        ((and 
+            (or (= sect "CHS")
+                (= sect "PIPE")
+                (= sect "RHS")
+                (= sect "SHS"))
+            (or (= view "SIDE")
+                (= view "SIDE_LONG")
+                (= view "SIDE_SHORT"))
+            (H_SIDE)))
+        ;*********
+        ((and 
+            (or (= sect "PIPE") 
+                (= sect "CHS"))
+            (= view "XSECT"))
+        (CHS_XSECT))
+        ;*********
+        ((and 
+            (or (= sect "RHS") 
+                (= sect "SHS"))
+            (= view "XSECT"))
+        (H_XSECT))
+        ;*********
+        ((and 
+            (or (= sect "STEEUB") 
+                (= sect "STEEUC"))
+            (= view "XSECT"))
+        (STEE_XSECT))
+        ;*********
+        ((and  
+            (= sect "RTEE")
+            (= view "XSECT"))
+        (RTEE_XSECT))
+        ;*********
+        ((and 
+            (or (= sect "STEEUB") 
+                (= sect "STEEUC") 
+                (= sect "RTEE"))
+            (or (= view "PLAN_TOE") 
+                (= view "PLAN_BACK")))
+        (I_PLAN))
+        ;*********
+            ((and 
+                (= sect "HEXBOLT")
+                (= view "SIDE"))
+        (STL_DRAW_BOLT))
+        ;*********
+        ((and 
+            (or (= sect "FNUT") 
+                (= sect "TNUT"))
+            (= view "SIDE"))
+        (STL_DRAW_NUTSIDE))
+        ;*********
+        ((and 
+            (or (= sect "HEXBOLT")
+                (= sect "FNUT") 
+                (= sect "TNUT"))
+            (= view "PLAN"))
+        (STL_HEX_PLAN))
+        ;*********
+        ((and 
+            (= sect "CAPHEAD")
+            (= view "SIDE"))
+        (STL_DRAW_CAPHEADSIDE))
+        ;*********
+        ((and 
+            (= sect "CAPHEAD")
+            (= view "PLAN"))
+        (STL_DRAW_CAPHEADPLAN))
+        ;*********
+        ((and 
+            (= sect "CSKHEAD")
+            (= view "SIDE"))
+        (STL_DRAW_CSKHEADSIDE))
+        ;*********
+        ((and 
+            (= sect "CSKHEAD")
+            (= view "PLAN"))
+        (STL_DRAW_CSKHEADPLAN))
+        ;*********
+        ((and 
+            (or (= sect "WASHERA")
+                (= sect "WASHERB")
+                (= sect "WASHERC")
+                (= sect "WASHERD")
+                (= sect "WASHERE")
+                (= sect "WASHERF")
+                (= sect "WASHERG"))
+            (= view "PLAN"))
+        (STL_WASHER_PLAN))
+        ;*********
+        ((and 
+            (or (= sect "WASHERA")
+                (= sect "WASHERB")
+                (= sect "WASHERC")
+                (= sect "WASHERD")
+                (= sect "WASHERE")
+                (= sect "WASHERF")
+                (= sect "WASHERG"))
+            (= view "SIDE"))
+        (STL_WASHER_SIDE))
+    )
+)
+;***********************************************************************************************************************
+(defun SET_I_LIST ()
+    (setq pd (open (strcat "c:/stl/" "stl_" sect ".dat") "r"))
+    (setq find (read-line pd))
+    (while find
+        (setq find_len (strlen find))
+        (if	(= "*" (substr find 1 1))
+            (progn (setq count 0)
+                (setq getchr nil)
+                (if (/= word nil)
+                    (setq chk_word word))
+                (while (/= "w" getchr)
+                    (setq count (1+ count))
+                    (setq getchr (substr find count 1)))
+                (setq word (substr find 2 (- count 2)))
+                (if (/= chk_word word)
+                    (progn (setq i_list (append i_list (list word)))))))
+        (setq find (read-line pd)))
+    (close pd)
+)
+;***********************************************************************************************************************
+(defun SET_SI_LIST ()
+    (setq pd (open (strcat "c:/stl/" "stl_" sect ".dat") "r"))
+    (setq find (read-line pd))
+    (while find
+        (if	(= "*" (substr find 1 1))
+            (progn
+                (setq word (substr find 2))
+                (if (/= chk_word word)
+                    (setq i_list (append i_list (list word))))))
+        (setq chk_word word)
+        (setq find (read-line pd)))
+    (close pd)
+)
+;***********************************************************************************************************************
+(defun SET_I_WT	()
+    (setq size (nth (atoi $value) i_list))
+    (setq pd (open (strcat "c:/stl/" "stl_" sect ".dat") "r"))
+    (setq find (read-line pd))
+    (while find
+        (setq find_len (strlen find))
+            (if	(= "*" (substr find 1 1))
+                (progn
+                    (setq count 0)
+                    (setq getchr nil)
+                    (while (/= "w" getchr)
+                        (setq count (1+ count))
+                        (setq getchr (substr find count 1)))
+                    (setq word (substr find 2 (- count 2)))
+                    (if (= size word)
+                        (progn
+                            (setq weight (substr find (1+ count) (- find_len count)))
+                            (setq i_wt_list (append i_wt_list (list weight)))))))
+        (setq find (read-line pd)))
+    (close pd)
+;****************************************************************************
+    (cond
+        ((or (= sect "UB")
+             (= sect "UC")
+             (= sect "CUB")
+             (= sect "CUC")
+             (= sect "UBP")
+             (= sect "RSJ")
+             (= sect "HD"))
+            (start_list "TABLE_I_WEIGHT"))
+        ((= sect "STEEUB") 
+            (start_list "TABLE_STEEUB_WEIGHT"))
+        ((= sect "STEEUC")
+            (start_list "TABLE_STEEUC_WEIGHT"))
+        ((= sect "RTEE")
+            (start_list "TABLE_RTEE_WEIGHT"))
+        ((= sect "ERSA")   
+            (start_list "TABLE_ERSA_THICK"))
+        ((= sect "URSA")  
+            (start_list "TABLE_URSA_THICK"))
+        ((= sect "SHS")    
+            (start_list "TABLE_SHS_THICK"))
+        ((= sect "RHS")
+            (start_list "TABLE_RHS_THICK"))
+        ((= sect "CHS")
+            (progn
+                (start_list "TABLE_CHS_THICK")
+                (setq D (atof (nth (atoi $value) I_LIST))))))
+    (mapcar 'add_list I_WT_LIST)
+    (end_list)
+)
+;***********************************************************************************************************************
+(defun SET_PIPE_SCHED ()
+    (setq pd (open (strcat "c:/stl/" "stl_" sect ".dat") "r"))
+    (setq data (read-line pd))
+    (if data
+        (progn
+            (setq   slength (strlen data)
+                count   1
+                char    1)
+            (while (< count slength)
+                (if (/= "," (substr data count 1))
+                    (setq char (1+ char))
+                    (setq   num         (substr data (1+ (- count char)) (- char 1))
+                            pipe_sched  (append pipe_sched (list num))
+                            char	    1))
+                (setq count (1+ count)))
+            (setq   num         (substr data (1+ (- count char)))
+                    pipe_sched  (append pipe_sched (list num)))))
+    (close pd)
+    (start_list "TABLE_PIPE_SCHED")
+    (mapcar 'add_list PIPE_SCHED)
+    (end_list)
+)
+;***********************************************************************************************************************
+(defun SET_PIPE_WALL ()
+    (setq pipe_size (strcat "*" size))
+    (setq sched_pos (nth (atoi $value) PIPE_SCHED))
+    (setq pd (open (strcat "c:/stl/" "stl_" sect ".dat") "r"))
+    (setq find (read-line pd))
+    (while find
+        (setq find (read-line pd))
+        (if	(= find pipe_size)
+            (progn
+                (setq   D	 (atof (read-line pd))
+                        data (read-line pd)
+                        find nil))))
+    (if data
+        (progn
+            (setq   slength (strlen data)
+                count   1
+                char    1)
+            (while (< count slength)
+                (if (/= "," (substr data count 1))
+                    (setq char (1+ char))
+                    (setq	num	    (substr data (1+ (- count char)) (- char 1))
+                            datalst	(append datalst (list num))
+                            char	1))
+                (setq count (1+ count)))
+            (setq   num	    (substr data (1+ (- count char)))
+                    datalst (append datalst (list num)))))
+    (close pd)
+    (setq posn 0)
+    (setq sched_find nil)
+    (while
+        (/= sched_pos sched_find)
+        (setq sched_find (nth posn pipe_sched))
+        (if (= sched_pos sched_find)
+            (setq thick (nth posn datalst)))
+        (setq posn (1+ posn)))
+    (cond
+        ((/= thick "0.00")
+            (progn 
+                (set_tile "PIPE_WALL" (strcat thick " wall"))
+                (mode_tile "STL_PIPE_OK" 0)))
+        ((= thick "0.00")
+            (progn 
+                (set_tile "PIPE_WALL" "N/A"))
+                (mode_tile "STL_PIPE_OK" 1)))
+)
+;***********************************************************************************************************************
+(defun STL_SET_LCR ()
+    (if
+        (new_dialog "stl_set_lcr" dcl_id)
+        (progn
+            (action_tile
+                "SETOUT_LEFT"
+                "(setq setout \"L\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_CENTRE"
+                "(setq setout \"C\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_RIGHT"
+                "(setq setout \"R\")(STL_DIA_EXIT)")
+            (action_tile 
+                "STL_SET_LCR_BACK" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_SET_TC ()
+    (if (new_dialog "stl_set_tc" dcl_id)
+        (progn
+            (action_tile
+                "SETOUT_TOP"
+                "(setq setout \"T\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_CENTR"
+                "(setq setout \"C\")(STL_DIA_EXIT)")
+            (action_tile 
+                "STL_SET_TC_BACK" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_SET_HSX ()
+    (if (new_dialog "stl_set_hsx" dcl_id)
+        (progn
+            (action_tile
+                "SETOUT_TOPCENT"
+                "(setq setout \"TC\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_RIGHTTOP"
+                "(setq setout \"RT\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_RIGHTCENT"
+                "(setq setout \"RC\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_RIGHTBTM"
+                "(setq setout \"RB\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_CEN"
+                "(setq setout \"C\") (STL_DIA_EXIT)")
+            (action_tile 
+                "STL_SET_HSX_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_SET_TCB ()
+    (if (new_dialog "stl_set_tcb" dcl_id)
+        (progn
+            (action_tile
+                "SETOUT_TO"
+                "(setq setout \"T\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_CENT"
+                "(setq setout \"C\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_BOTTOM"
+                "(setq setout \"B\")(STL_DIA_EXIT)")
+            (action_tile 
+                "STL_SET_TCB_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_TOE_FH ()
+    (if (new_dialog "stl_toe_fh" dcl_id)
+        (progn
+            (action_tile 
+                "TOE_F"
+                "(setq toe_fh \"F\")(done_dialog 1)")
+            (action_tile 
+                "TOE_H" 
+                "(setq toe_fh \"H\")(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_SET_BAT ()
+    (if (and 
+        (= toe_fh nil)
+        (or (= view "SIDE")
+            (= view "SIDE_LONG")
+            (= view "SIDE_SHORT")))
+    (STL_TOE_FH))
+    (if (new_dialog "stl_set_bat" dcl_id)
+        (progn
+            (action_tile
+                "SETOUT_BACK"
+                "(setq setout \"B\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_AXIS"
+                "(setq setout \"A\")(STL_DIA_EXIT)")
+            (action_tile
+                "SETOUT_TOE"
+                "(setq setout \"T\")(STL_DIA_EXIT)")
+            (action_tile 
+                "STL_SET_BAT_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_DIA_EXIT ()
+    (done_dialog 1)
+    (done_dialog 1)
+    (done_dialog 1)
+    (done_dialog 1)
+)
+;***********************************************************************************************************************
+(defun STL_VIEW_SX ()
+    (if (new_dialog "stl_view_sx" dcl_id)
+        (progn
+            (action_tile
+                "VIEW_SX_SIDE"
+                "(setq view \"SIDE\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_SX_XSECT"
+                "(setq view \"XSECT\")(STL_SET_TC)")
+            (action_tile 
+                "STL_VIEW_SX_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_VIEW_HS ()
+    (if (new_dialog "stl_view_hs" dcl_id)
+        (progn
+            (action_tile
+                "VIEW_HS_SIDE"
+                "(setq view \"SIDE\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_HS_XSECT"
+                "(setq view \"XSECT\")(STL_SET_HSX)")
+            (action_tile 
+                "STL_VIEW_HS_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_VIEW_SPX ()
+    (if (new_dialog "stl_view_spx" dcl_id)
+        (progn
+            (action_tile
+                "VIEW_SIDE"
+                "(setq view \"SIDE\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_PLAN"
+                "(setq view \"PLAN\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_XSECT"
+                "(setq view \"XSECT\")(STL_SET_TC)")
+            (action_tile 
+                "STL_VIEW_SPX_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_VIEW_RSC ()
+    (if (new_dialog "stl_view_rsc" dcl_id)
+        (progn
+            (action_tile
+                "VIEW_RSC_SIDE"
+                "(setq view \"SIDE\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_RSC_BACK"
+                "(setq view \"BACK\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_RSC_PLAN"
+                "(setq view \"PLAN\") (STL_SET_BAT)")
+            (action_tile
+                "VIEW_RSC_XSECT"
+                "(setq view \"XSECT\")(STL_SET_TCB)")
+            (action_tile 
+                "STL_VIEW_RSC_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_VIEW_ERSA ()
+    (if (new_dialog "stl_view_ersa" dcl_id)
+        (progn
+            (action_tile
+                "VIEW_ERSA_SIDE"
+                "(setq view \"SIDE\")   (STL_SET_BAT)")
+            (action_tile
+                "VIEW_ERSA_XSECT_L"
+                "(setq view \"XSECT_L\")(STL_SET_BAT)")
+            (action_tile
+                "VIEW_ERSA_XSECT_R"
+                "(setq view \"XSECT_R\")(STL_SET_BAT)")
+            (action_tile
+                "STL_VIEW_ERSA_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_VIEW_URSA ()
+    (if
+        (new_dialog "stl_view_ursa" dcl_id)
+            (progn
+                (action_tile
+                    "VIEW_URSA_SIDE_L"
+                    "(setq view \"SIDE_LONG\") (STL_SET_BAT)"
+                )
+                (action_tile
+                    "VIEW_URSA_SIDE_S"
+                    "(setq view \"SIDE_SHORT\")(STL_SET_BAT)"
+                )
+                (action_tile
+                    "VIEW_URSA_XSECT_SL"
+                    "(setq view \"XSECT_SHORT_LEFT\")(STL_SET_BAT)"
+                )
+                (action_tile
+                    "VIEW_URSA_XSECT_SR"
+                    "(setq view \"XSECT_SHORT_RIGHT\")(STL_SET_BAT)"
+                )
+                (action_tile
+                    "VIEW_URSA_XSECT_LL"
+                    "(setq view \"XSECT_LONG_LEFT\")(STL_SET_BAT)"
+                )
+                (action_tile
+                    "VIEW_URSA_XSECT_LR"
+                    "(setq view \"XSECT_LONG_RIGHT\")(STL_SET_BAT)"
+                )
+                (action_tile "STL_VIEW_URSA_BACK" "(done_dialog 1)")
+                (action_tile "STL_cancel" "(done_dialog 1)")
+            )
+    )
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_VIEW_RHS ()
+    (if (new_dialog "stl_view_rhs" dcl_id)
+        (progn
+            (action_tile
+                "VIEW_RHS_SIDE_L"
+                "(setq view \"SIDE_LONG\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_RHS_SIDE_S"
+                "(setq view \"SIDE_SHORT\")(STL_SET_LCR)")
+            (action_tile
+                "VIEW_RHS_XSECT"
+                "(setq view \"XSECT\")(STL_SET_HSX)")
+            (action_tile 
+                "STL_VIEW_RHS_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_VIEW_TEES ()
+    (if (new_dialog "stl_view_tees" dcl_id)
+        (progn
+            (action_tile
+                "VIEW_TEES_SIDE"
+                "(setq view \"TSIDE\")    (STL_SET_BAT)")
+            (action_tile
+                "VIEW_TEES_PLAN_BACK"
+                "(setq view \"PLAN_BACK\")(STL_SET_LCR)")
+            (action_tile
+                "VIEW_TEES_PLAN_TOE"
+                "(setq view \"PLAN_TOE\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_TEES_XSECT"
+                "(setq view \"XSECT\")    (STL_SET_BAT)")
+            (action_tile 
+                "STL_VIEW_TEES_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_I ()
+    (if (new_dialog "stl_i" dcl_id)
+        (progn
+            (SET_I_LIST)
+            (start_list "TABLE_I")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile "TABLE_I" "(setq i_wt_list nil)(SET_I_WT)")
+            (action_tile
+                "TABLE_I_WEIGHT"
+                "(setq weight (nth (atoi $value) I_WT_LIST))(STL_VIEW_SPX)")
+            (action_tile
+                "STL_I_BACK"
+                "(setq i_list nil)(setq i_wt_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_SI ()
+    (if (new_dialog "stl_si" dcl_id)
+        (progn
+            (SET_SI_LIST)
+            (start_list "TABLE_SI")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile
+                "TABLE_SI"
+                "(setq size (nth (atoi $value) I_LIST))(STL_VIEW_SPX)")
+            (action_tile
+                "STL_SI_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_RSC ()
+    (if (new_dialog "stl_rsc" dcl_id)
+        (progn
+            (SET_SI_LIST)
+            (start_list "TABLE_RSC")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile
+                "TABLE_RSC"
+                "(setq size (nth (atoi $value) I_LIST))(STL_VIEW_RSC)")
+            (action_tile
+                "STL_RSC_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_PFC ()
+    (if (new_dialog "stl_rsc" dcl_id)
+        (progn
+            (SET_SI_LIST)
+            (start_list "TABLE_RSC")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile
+                "TABLE_RSC"
+                "(setq size (nth (atoi $value) I_LIST))(STL_VIEW_RSC)")
+            (action_tile
+                "STL_RSC_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_U ()
+    (if (new_dialog "stl_rsc" dcl_id)
+        (progn
+            (SET_SI_LIST)
+            (start_list "TABLE_RSC")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile
+                "TABLE_RSC"
+                "(setq size (nth (atoi $value) I_LIST))(STL_VIEW_RSC)")
+            (action_tile
+                "STL_RSC_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_UPN ()
+    (if (new_dialog "stl_rsc" dcl_id)
+        (progn
+            (SET_SI_LIST)
+            (start_list "TABLE_RSC")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile
+                "TABLE_RSC"
+                "(setq size (nth (atoi $value) I_LIST))(STL_VIEW_RSC)")
+            (action_tile
+                "STL_RSC_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_ERSA	()
+    (if (new_dialog "stl_ersa" dcl_id)
+        (progn
+            (SET_I_LIST)
+            (start_list "TABLE_ERSA")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile "TABLE_ERSA" "(setq i_wt_list nil)(SET_I_WT)")
+            (action_tile
+                "TABLE_ERSA_THICK"
+                "(setq thick (nth (atoi $value) I_WT_LIST))(STL_VIEW_ERSA)")
+            (action_tile
+                "STL_ERSA_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_URSA	()
+    (if  (new_dialog "stl_ursa" dcl_id)
+        (progn
+            (SET_I_LIST)
+            (start_list "TABLE_URSA")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile 
+                "TABLE_URSA" 
+                "(setq i_wt_list nil)(SET_I_WT)")
+            (action_tile
+                "TABLE_URSA_THICK"
+                "(setq thick (nth (atoi $value) I_WT_LIST))(STL_VIEW_URSA)")
+            (action_tile
+                "STL_URSA_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_CHS ()
+    (if (new_dialog "stl_chs" dcl_id)
+        (progn
+            (SET_I_LIST)
+            (start_list "TABLE_CHS")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile
+                "TABLE_CHS" 
+                "(setq i_wt_list nil)(SET_I_WT)")
+            (action_tile
+                "TABLE_CHS_THICK"
+                "(setq thick (nth (atoi $value) I_WT_LIST))(STL_VIEW_SX)")
+            ;(action_tile 
+            ;    "TABLE_CHS_THICK" 
+            ;    "(setq thick (nth (atoi $value) I_WT_LIST))")
+            (action_tile
+                "STL_CHS_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_SHS ()
+    (if (new_dialog "stl_shs" dcl_id)
+        (progn
+            (SET_I_LIST)
+            (start_list "TABLE_SHS")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile 
+                "TABLE_SHS" 
+                "(setq i_wt_list nil)(SET_I_WT)")
+            ;(action_tile 
+            ;    "TABLE_SHS_THICK" 
+            ;    "(setq thick (nth (atoi $value) I_WT_LIST))(STL_VIEW_HS)")
+            (action_tile
+                "TABLE_SHS_THICK"
+                "(setq thick (nth (atoi $value) I_WT_LIST))")
+            (action_tile
+                "VIEW_HS_SIDE"
+                "(setq view \"SIDE\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_HS_XSECT"
+                "(setq view \"XSECT\")(STL_SET_HSX)")
+            (action_tile
+                "STL_SHS_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_RHS ()
+    (if (new_dialog "stl_rhs" dcl_id)
+        (progn
+            (SET_I_LIST)
+            (start_list "TABLE_RHS")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile 
+                "TABLE_RHS" 
+                "(setq i_wt_list nil)(SET_I_WT)")
+            ;(action_tile
+            ;    "TABLE_RHS_THICK" 
+            ;    "(setq thick (nth (atoi $value) I_WT_LIST))(STL_VIEW_RHS)")
+            (action_tile
+                "TABLE_RHS_THICK"
+                "(setq thick (nth (atoi $value) I_WT_LIST))")
+            (action_tile
+                "VIEW_RHS_SIDE_L"
+                "(setq view \"SIDE_LONG\") (STL_SET_LCR)")
+            (action_tile
+                "VIEW_RHS_SIDE_S"
+                "(setq view \"SIDE_SHORT\")(STL_SET_LCR)")
+            (action_tile
+                "VIEW_RHS_XSECT"
+                "(setq view \"XSECT\")(STL_SET_HSX)")
+            (action_tile
+                "STL_RHS_BACK"
+                "(setq i_list nil)(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_PIPE	()
+    (if (new_dialog "stl_pipe" dcl_id)
+        (progn
+            (mode_tile "STL_PIPE_OK" 1)
+            (SET_SI_LIST)
+            (start_list "TABLE_PIPE")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile
+                "TABLE_PIPE"
+                "(setq pipe_sched nil)
+                    (SET_PIPE_SCHED)
+                    (setq size (nth (atoi $value) I_LIST))
+                    (set_tile \"PIPE_WALL\" (strcat size \" NB\"))")
+            (action_tile 
+                "TABLE_PIPE_SCHED" 
+                "(SET_PIPE_WALL)")
+            (action_tile 
+                "STL_PIPE_BACK" 
+                "(done_dialog 1)")
+            (action_tile 
+                "STL_cancel" 
+                "(done_dialog 1)")))
+    (action_tile "STL_PIPE_OK" "(STL_VIEW_SX)")
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_STEEUC ()
+    (if (new_dialog "stl_steeuc" dcl_id)
+        (progn
+            (SET_I_LIST)
+            (start_list "TABLE_STEEUC")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile
+                "TABLE_STEEUC"
+                "(setq i_wt_list nil)(SET_I_WT)")
+            (action_tile
+                "TABLE_STEEUC_WEIGHT"
+                "(setq weight (nth (atoi $value) I_WT_LIST))(STL_VIEW_TEES)")
+            (action_tile
+                "STL_STEEUC_BACK"
+                "(setq i_list nil)(setq i_wt_list nil)(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_STEEUB ()
+    (if (new_dialog "stl_steeub" dcl_id)
+        (progn
+            (SET_I_LIST)
+            (start_list "TABLE_STEEUB")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile
+                "TABLE_STEEUB"
+                "(setq i_wt_list nil)(SET_I_WT)")
+            (action_tile
+                "TABLE_STEEUB_WEIGHT"
+                "(setq weight (nth (atoi $value) I_WT_LIST))(STL_VIEW_TEES)")
+            (action_tile
+                "STL_STEEUB_BACK"
+                "(setq i_list nil)(setq i_wt_list nil)(done_dialog 1)")))
+    (start_dialog)
+)
+;***********************************************************************************************************************
+(defun STL_RTEE	()
+    (if (new_dialog "stl_rtee" dcl_id)
+        (progn
+            (SET_I_LIST)
+            (start_list "TABLE_RTEE")
+            (mapcar 'add_list I_LIST)
+            (end_list)
+            (action_tile 
+                "TABLE_RTEE" 
+                "(setq i_wt_list nil)(SET_I_WT)")
+            (action_tile
+                "TABLE_RTEE_WEIGHT"
+                "(setq weight (nth (atoi $value) I_WT_LIST))(STL_VIEW_TEES)")
+            (action_tile
+                "STL_RTEE_BACK"
+                "(setq i_list nil)(setq i_wt_list nil)(done_dialog 1)")))
+    (start_dialog)
+)
+;*********ANGLE CONVERTER***********************************************************************************************
+(defun stl_dtr (a)
+    (* pi (/ a 180.0))
+)
+;*********DATA COLLECTION***********************************************************************************************
+(defun STL_DATA	(/ pd number find data slength char num count datalst)
+    (setq pd (open (strcat "c:/stl/" "stl_" sect ".dat") "r"))
+    ;check type of section-size-weight
+    (cond
+        (;*size
+            (or (= sect "RSC")
+                (= sect "PFC")
+                (= sect "U")
+                (= sect "UPN")
+                (= sect "IPN")
+                (= sect "IPE")
+                (= sect "HE")
+                (= sect "HL")
+                (= sect "HX"))
+            (setq number (strcat "*" size))
+        )
+        (;*size x thick
+            (or (= sect "ERSA") 
+                (= sect "URSA"))
+            (setq number (strcat "*" size "w" thick))
+        )
+        (;*size x weight
+            (or (= sect "UB")
+                (= sect "UC")
+                (= sect "CUB")
+                (= sect "CUC")
+                (= sect "UBP")
+                (= sect "RSJ")
+                (= sect "RTEE")
+                (= sect "STEEUB")
+                (= sect "STEEUC")
+                (= sect "PIPE")
+                (= sect "HD"))
+            (setq number (strcat "*" size "w" weight))
+        )
+    )
+    ;get sizes from file
+    (setq find (read-line pd))
+    (while find
+        (setq find (read-line pd))
+        (if	(= find number)
+            (setq data (read-line pd)
+                find nil)))
+    (if data
+        (progn
+            (setq   slength (strlen data)
+                count   1
+                char    1)
+            (while (< count slength)
+                (if (/= "," (substr data count 1))
+                    (setq char (1+ char))
+                    (setq   num	    (atof (substr data (1+ (- count char)) (- char 1)))
+                        datalst	(append datalst (list num))
+                        char	1))
+                (setq count (1+ count)))
+            (setq   num	    (atof (substr data (1+ (- count char))))
+                datalst (append datalst (list num)))))
+    (close pd)
+    ;*********
+    (cond
+        (;**UB-UC-UBP
+            (or (= sect "UB")
+                (= sect "UC")
+                (= sect "UBP")
+                (= sect "IPE")
+                (= sect "HD")
+                (= sect "HE")
+                (= sect "HL")
+                (= sect "HX"))
+            (mapcar 'set '(D W WT FT R) datalst)
+            (if (= STLUNITS "INCH")
+                (setq D	 (/ D 1000)
+                    W	 (/ W 1000)
+                    WT (/ WT 1000)
+                    FT (/ FT 1000)
+                    R	 (/ R 1000)))
+        )
+        (;**RSJ
+            (or (= sect "RSJ") 
+                (= sect "IPN"))
+            (mapcar 'set '(D W WT FT R RX) datalst)
+            (if (= STLUNITS "INCH")
+                (setq D	 (/ D 1000)
+                    W	 (/ W 1000)
+                    WT (/ WT 1000)
+                    FT (/ FT 1000)
+                    R	 (/ R 1000)
+                    RX (/ RX 1000)))
+        )
+        (;**CUB-CUC
+            (or (= sect "CUB")
+                (= sect "CUC"))
+            (mapcar 'set '(D W WT FT R DC) datalst)
+            (if (= STLUNITS "INCH")
+                (setq D	 (/ D 1000)
+                    W	 (/ W 1000)
+                    WT (/ WT 1000)
+                    FT (/ FT 1000)
+                    R	 (/ R 1000)
+                    DC (/ DC 1000)))
+        )
+        (;**RSC
+            (or (= sect "RSC")
+                (= sect "UPN")
+                (= sect "U"))
+            (mapcar 'set '(D W WT FT R RX CY SLOPE) datalst)
+            (if (= STLUNITS "INCH")
+                (setq D	 (/ D 1000)
+                    W	 (/ W 1000)
+                    WT (/ WT 1000)
+                    FT (/ FT 1000)
+                    R	 (/ R 1000)
+                    RX (/ RX 1000)
+                    CY (/ CY 1000)))
+        )
+        (;**PFC
+            (= sect "PFC")
+            (mapcar 'set '(D W WT FT R CY) datalst)
+            (if (= STLUNITS "INCH")
+                (setq D	 (/ D 1000)
+                    W	 (/ W 1000)
+                    WT (/ WT 1000)
+                    FT (/ FT 1000)
+                    R	 (/ R 1000)
+                    CY (/ CY 1000)))
+        )
+        (;**STEEUB-STEEUC
+            (or (= sect "STEEUB")
+                (= sect "STEEUC"))
+            (mapcar 'set '(D W WT FT R CX) datalst)
+            (if (= STLUNITS "INCH")
+                (setq D	 (/ D 1000)
+                    W	 (/ W 1000)
+                    WT (/ WT 1000)
+                    FT (/ FT 1000)
+                    R	 (/ R 1000)
+                    CX (/ CX 1000)))
+        )
+        (;**RTEE
+            (= sect "RTEE")
+            (mapcar 'set '(D W WT FT R RX CX) datalst)
+            (if (= STLUNITS "INCH")
+                (setq D	 (/ D 1000)
+                    W	 (/ W 1000)
+                    WT (/ WT 1000)
+                    FT (/ FT 1000)
+                    R	 (/ R 1000)
+                    RX (/ RX 1000)
+                    CX (/ CX 1000)))
+        )
+        (;**URSA
+            (= sect "URSA")
+            (mapcar 'set '(D W FT R RX CX CY) datalst)
+            (if (= STLUNITS "INCH")
+                (setq D	 (/ D 1000)
+                    W	 (/ W 1000)
+                    FT (/ FT 1000)
+                    R	 (/ R 1000)
+                    RX (/ RX 1000)
+                    CX (/ CX 1000)
+                    CY (/ CY 1000)))
+        )
+        (;**HEXNUTS/BOLTS
+            (or (= sect "FNUT")
+                (= sect "TNUT")
+                (= sect "HEXBOLT"))
+            (mapcar 'set '(AF PITC PITF HH FNH TNH) datalst)
+            (if (= STLUNITS "INCH")
+                (setq AF   (/ AF 1000)
+                    PITC (/ PITC 1000)
+                    PITF (/ PITF 1000)
+                    HH   (/ HH 1000)
+                    FNH  (/ FNH 1000)
+                    TNH  (/ TNH 1000)))
+        )
+        (;**ERSA
+            (= sect "ERSA")
+            (mapcar 'set '(D FT R RX CX) datalst)
+            (if (= STLUNITS "INCH")
+                (setq D	 (/ D 1000)
+                    FT (/ FT 1000)
+                    R	 (/ R 1000)
+                    RX (/ RX 1000)
+                    CX (/ CX 1000)))
+        )
+    )
+)
+;********START FINISH***************************************************************************************************
+(defun STL_ST_FIN ()
+    (initget 1)
+    (setq CE1 (getpoint "\nPick START POINT: "))
+    (initget 1)
+    (setq CE2 (getpoint CE1 "\nTo POINT: "))
+)
+;*********Draws BEAMS SIDEVIEW******************************************************************************************
+(defun I_SIDE (/ CE1 CE2 C1 C2 P1 P2 P3 P4 A F1 F2 D W WT FT R RX CY ang1)
+    (STL_DATA)
+    (STL_ST_FIN)
+    (setq OSMD (getvar "OSMODE"))
+    (setvar "OSMODE" 0)
+    (setq ang1 (angle CE1 CE2))
+    (command "_.layer" "set" out "")
+    (cond
+        (
+            (= setout "L")
+            (progn
+                (setq   C1	(polar CE1 (- ang1 (stl_dtr 90)) (* 0.5 D))
+                    C2	(polar CE2 (- ang1 (stl_dtr 90)) (* 0.5 D))))
+        )
+        (
+            (= setout "R")
+            (progn
+                (setq   C1	(polar CE1 (+ ang1 (stl_dtr 90)) (* 0.5 D))
+                    C2	(polar CE2 (+ ang1 (stl_dtr 90)) (* 0.5 D))))
+        )
+        (
+            (= setout "C")
+            (progn 
+                (setq   C1 CE1
+                    C2 CE2))
+        )
+    )
+    (setq	P1 (polar C1 (+ ang1 (stl_dtr 90)) (* 0.5 D))
+        P2 (polar C2 (+ ang1 (stl_dtr 90)) (* 0.5 D))
+        P3 (polar C1 (- ang1 (stl_dtr 90)) (* 0.5 D))
+        P4 (polar C2 (- ang1 (stl_dtr 90)) (* 0.5 D)))
+    (command "_.line" P1 P2 "")
+    (setq A (entlast))
+    (command "_.copy"
+        A
+        ""
+        P1
+        (polar P1 (- ang1 (stl_dtr 90)) FT))
+    (setq F1 (entlast))
+    (command "_.line" P3 P4 "")
+    (setq A (entlast))
+    (command "_.copy"
+        A
+        ""
+        P3
+        (polar P3 (+ ang1 (stl_dtr 90)) FT))
+    (setq F2 (entlast))
+    (command "_.line" P1 P3 "" "_.line" P2 P4 "")
+    (if (= view "BACK")
+        (command "_.change" F1 F2 "" "prop" "layer" hid ""))
+    (if (and
+        (= view "SIDE")
+        (or (= sect "CUB") 
+            (= sect "CUC")))
+    (STL_CAST))
+    (command "_.layer" "set" cen "" "_.line" C1 C2 "")
+    (setvar "OSMODE" OSMD)
+    (STL_VAR_RESET)
+)
+;*********DRAWS CASTELLATIONS
+(defun stl_cast (/ CT1 CT2 CT3 CT4 CT5 CT6 A NMB ang)
+    (setq	CT1 (polar C1
+        (+ ang1 (stl_dtr 60))
+        (/ (* 0.5 DC) (sin (stl_dtr 60))))
+    CT5 (polar C1
+        (- ang1 (stl_dtr 60))
+        (/ (* 0.5 DC) (sin (stl_dtr 60))))
+    CT3 (polar C1 ang1 (* 0.83 DC))
+    CT6 (polar C1 ang1 (* 1.08 DC))
+    CT2 (polar CT3
+        (+ ang1 (stl_dtr 120))
+        (/ (* 0.5 DC) (sin (stl_dtr 60))))
+    CT4 (polar CT3
+        (- ang1 (stl_dtr 120))
+        (/ (* 0.5 DC) (sin (stl_dtr 60))))) 
+    (command "_.layer" "set" out "" "_.pline" C1 "w" 0 0 CT1 CT2 CT3 CT4 CT5 "c")
+    (setq A (entlast))
+        ;(command "scale" a "" c1 "0.01")   ;Baios
+    (setq NMB (fix (/ (distance C1 C2) (* 1.08 DC))))
+    (setq ang (getvar "snapang"))
+    (setvar "snapang" ang1)
+    (command "_.array" A "" "r" 1 NMB C1 CT6)
+    (setvar "snapang" ang)
+)
+;*********Draws BEAMS PLANVIEW******************************************************************************************
+(defun I_PLAN (/ CE1 CE2 C1 C2 P1 P2 P3 P4 A W1 W2 D W WT FT R ang1)
+    (STL_DATA)
+    (STL_ST_FIN)
+    (setq OSMD (getvar "OSMODE"))
+    (setvar "OSMODE" 0)
+    (setq ang1 (angle CE1 CE2))
+    (command "_.layer" "set" cen "")
+    (cond
+        ((= setout "L")
+            (progn
+                (setq   C1	(polar CE1 (- ang1 (stl_dtr 90)) (* 0.5 W))
+                    C2	(polar CE2 (- ang1 (stl_dtr 90)) (* 0.5 W)))))
+        ((= setout "R")
+            (progn
+                (setq   C1	(polar CE1 (+ ang1 (stl_dtr 90)) (* 0.5 W))
+                    C2	(polar CE2 (+ ang1 (stl_dtr 90)) (* 0.5 W)))))
+        ((= setout "C")
+            (progn
+                (setq   C1	CE1
+                    C2	CE2)))
+    )
+    (setq	P1 (polar C1 (+ ang1 (stl_dtr 90)) (* 0.5 W))
+        P2 (polar C2 (+ ang1 (stl_dtr 90)) (* 0.5 W))
+        P3 (polar C1 (- ang1 (stl_dtr 90)) (* 0.5 W))
+        P4 (polar C2 (- ang1 (stl_dtr 90)) (* 0.5 W)))
+    (command "_.line" C1 C2 "")
+    (setq A (entlast))
+    (command "_.copy"
+        A
+        ""
+        C1
+        (polar C1 (- ang1 (stl_dtr 90)) (* 0.5 WT))
+    )
+    (setq W1 (entlast))
+    (command "_.copy"
+        A
+        ""
+        C1
+        (polar C1 (+ ang1 (stl_dtr 90)) (* 0.5 WT))
+    )
+    (setq W2 (entlast))
+    (command "_.layer"	   "set"   out	   ""	   "_.line"
+        P1	   P2	   ""	   "_.line"	   P3	   P4
+        ""	   "_.line"	   P1	   P3	   ""	   "_.line"
+        P2	   P4	   ""
+    )
+    (if (or (= sect "UB")
+            (= sect "UC")
+            (= sect "UBP")
+            (= sect "CUB")
+            (= sect "CUC")
+            (= sect "RSJ")
+            (= view "PLAN_BACK"))
+        (command "_.change" W1 W2 "" "prop" "layer" hid ""))
+    (if (= view "PLAN_TOE")
+        (command "_.change" W1 W2 "" "prop" "layer" out ""))
+    (setvar "OSMODE" OSMD)
+    (STL_VAR_RESET)
+)
+;*********Draws BEAMS XSECTION******************************************************************************************
+(defun I_XSECT (/   C1	 C2   P1   P2	P3   P4   P5   P6   P7	 P8
+    P9   P10  P11  P12  P13	 P14  P15  P16	P17  P18  P19
+    P20  D	  W    WT   FT	 R    PC1  PC2	PC3  PC4  ITEM1
+    CL1  CL2  CL3  CL4)
+(STL_DATA)
+(setq CE1 (getpoint "\nPick SETOUT position: "))
+(setq OSMD (getvar "OSMODE"))
+(setvar "OSMODE" 0)
+(cond
+    ((= setout "T")
+        (setq C1 (polar CE1 (stl_dtr 270) (* 0.5 D))))
+    ((= setout "C")
+        (setq C1 CE1))
+)
+(command "_.layer" "set" out "")
+(setq	P1  (polar C1 (stl_dtr 270) (* 0.5 D))
+    P11 (polar C1 (stl_dtr 90) (* 0.5 D))
+    P6  (polar C1 (stl_dtr 180) (* 0.5 WT))
+    P16 (polar C1 (stl_dtr 0) (* 0.5 WT))
+    P2  (polar P1 (stl_dtr 180) (* 0.5 W))
+    P10 (polar P11 (stl_dtr 180) (* 0.5 W))
+    P12 (polar P11 (stl_dtr 0) (* 0.5 W))
+    P20 (polar P1 (stl_dtr 0) (* 0.5 W))
+    P3  (polar P2 (stl_dtr 90) FT)
+    P9  (polar P10 (stl_dtr 270) FT)
+    P13 (polar P12 (stl_dtr 270) FT)
+    P19 (polar P20 (stl_dtr 90) FT)
+    P4  (polar P3 (stl_dtr 0) (- (* 0.5 W) (+ R (* 0.5 WT))))
+    P8  (polar P9 (stl_dtr 0) (- (* 0.5 W) (+ R (* 0.5 WT))))
+    P14 (polar P13 (stl_dtr 180) (- (* 0.5 W) (+ R (* 0.5 WT))))
+    P18 (polar P19 (stl_dtr 180) (- (* 0.5 W) (+ R (* 0.5 WT))))
+    P5  (polar P6 (stl_dtr 270) (- (* 0.5 D) (+ R FT)))
+    P7  (polar P6 (stl_dtr 90) (- (* 0.5 D) (+ R FT)))
+    P15 (polar P16 (stl_dtr 90) (- (* 0.5 D) (+ R FT)))
+    P17 (polar P16 (stl_dtr 270) (- (* 0.5 D) (+ R FT))))
+(command    "_.pline"   P2    "w"   0	    0       P3    P4	"a"     P5
+    "l"	        P7    "a"   P8      "l"     P9    P10   P12     P13	    P14
+    "a"	        P15   "l"   P17     "a"	    P18   "l"   P19     P20     "c")
+(setq ITEM1 (entlast))
+;(command "scale" item1 "" c1 "0.01")   ;Baios
+(command "_.layer" "set" cen "")
+(setq	PC1 (polar C1 (stl_dtr 0) (* 0.015 D))
+    PC2 (polar C1 (stl_dtr 90) (* 0.015 D))
+    PC3 (polar C1 (stl_dtr 180) (* 0.015 D))
+    PC4 (polar C1 (stl_dtr 270) (* 0.015 D)))
+(command "_.line" C1 PC1 "")
+(setq CL1 (entlast))
+(command "_.line" C1 PC2 "")
+(setq CL2 (entlast))
+(command "_.line" C1 PC3 "")
+(setq CL3 (entlast))
+(command "_.line" C1 PC4 "")
+(setq CL4 (entlast))
+(setvar "OSMODE" OSMD)
+(setvar "cmdecho" 1)
+(command "_.rotate" ITEM1 CL1 CL2 CL3 CL4 "" CE1)
+(while (eq 1 (logand 1 (getvar "cmdactive")))
+    (command pause)
+)
+(setvar "cmdecho" 0)
+(STL_VAR_RESET)
+)
+;*********Draws R.S.C. XSECTION*****************************************************************************************
+(defun RSC_XSECT (/ CE1  C1	    TP1  TP2  TP3   TP4     TP5  TP6  TP7
+    TP8  TP9    TP10 TP11 TP12  TP13    TP14 TP15 TP16 TR1
+    TR2  TR3    TR4	 P1   P2    P3	    P4   P5	  P6   P7
+    P8   P9     P10	 P11  P12   ITEM1   CL1  CL2  AX1
+    AX2  CX1    CX2	 D    W	    WT	    FT   R	  RX   CY
+    slope)
+(STL_DATA)
+(setq CE1 (getpoint "\nPick SETOUT position: "))
+(setq OSMD (getvar "OSMODE"))
+(setvar "OSMODE" 0)
+(cond
+    ((= setout "T")
+        (setq C1 (polar CE1 (stl_dtr 270) (* 0.5 D))))
+    ((= setout "B")
+        (setq C1 (polar CE1 (stl_dtr 90) (* 0.5 D))))
+    ((= setout "C")
+        (setq C1 CE1))
+)
+(command "_.layer" "set" out "")
+(setq	P1   (polar C1 (stl_dtr 90) (* 0.5 D))
+    P2   (polar C1 (stl_dtr 270) (* 0.5 D))
+    C2   (polar C1 (stl_dtr 0) CY)
+    AX1  (polar C1 (stl_dtr 0) (* 0.5 W))
+    AX2  (polar C1 (stl_dtr 180) (* 0.5 W))
+    CX1  (polar C2 (stl_dtr 90) (* 1.5 D))
+    CX2  (polar C2 (stl_dtr 270) (* 1.5 D))
+    TP1  (polar P1 (stl_dtr 0) (+ WT R))
+    TP2  (polar P1 (stl_dtr 0) (+ WT (* 0.5 (- W WT))))
+    TP3  (polar P1 (stl_dtr 0) (- W RX))
+    TP4  (polar P2 (stl_dtr 0) (+ WT R))
+    TP5  (polar P2 (stl_dtr 0) (+ WT (* 0.5 (- W WT))))
+    TP6  (polar P2 (stl_dtr 0) (- W RX))
+    TP7  (polar TP2 (stl_dtr 270) FT)
+    TP8  (polar TP5 (stl_dtr 90) FT)
+    TP9  (polar TP7 (stl_dtr 278) R)
+    TP10 (polar TP9 (stl_dtr slope) W)
+    TP11 (polar TP8 (stl_dtr (- 90 slope)) R)
+    TP12 (polar TP11 (stl_dtr (- 360 slope)) W)
+    TP13 (polar TP7 (stl_dtr (+ 90 slope)) RX)
+    TP14 (polar TP13 (stl_dtr slope) W)
+    TP15 (polar TP8 (stl_dtr (- 270 slope)) RX)
+    TP16 (polar TP15 (stl_dtr (- 360 slope)) W)
+    TR1  (inters TP1 TP4 TP9 TP10 nil)
+    TR2  (inters TP3 TP6 TP13 TP14 nil)
+    TR3  (inters TP1 TP4 TP11 TP12 nil)
+    TR4  (inters TP3 TP6 TP15 TP16 nil)
+    P3   (polar P2 (stl_dtr 0) W)
+    P4   (polar TR4 (stl_dtr 0) RX)
+    P5   (polar TR4 (stl_dtr (- 90 slope)) RX)
+    P6   (polar TR3 (stl_dtr (- 270 slope)) R)
+    P7   (polar TR3 (stl_dtr 180) R)
+    P8   (polar TR1 (stl_dtr 180) R)
+    P9   (polar TR1 (stl_dtr (+ 90 slope)) R)
+    P10  (polar TR2 (stl_dtr (+ 270 slope)) RX)
+    P11  (polar TR2 (stl_dtr 0) RX)
+    P12  (polar P1 (stl_dtr 0) W))
+(command "_.pline"   P1    "w"   0	 0     P2    P3	   P4	 "a"
+    P5	 "l"   P6    "a"   P7	 "l"   P8    "a"   P9	 "l"
+    P10	 "a"   P11   "l"   P12	 "c")
+(setq ITEM1 (entlast))
+;(command "scale" item1 "" c1 "0.01")   ;Baios
+(command "_.layer" "set" cen "")
+(command "_.line" AX1 AX2 "")
+(setq CL1 (entlast))
+(command "_.line" CX1 CX2 "")
+(setq CL2 (entlast))
+(setvar "OSMODE" OSMD)
+(setvar "cmdecho" 1)
+(command "_.rotate" ITEM1 CL1 CL2 "" CE1)
+(while (eq 1 (logand 1 (getvar "cmdactive")))
+    (command pause))
+(setvar "cmdecho" 0)
+(STL_VAR_RESET)
+)
+;*********Draws P.F.C. XSECTION*****************************************************************************************
+(defun PFC_XSECT (/     CE1  C1	 TP1  TP2  P1	P2   P3	  P4   P5
+    P6   P7   P8	 P9   P10  ITEM1     CL1  CL2  AX1
+    AX2  CX1  CX2	 D    W	   WT	FT   R	  CY)
+(STL_DATA)
+(setq CE1 (getpoint "\nPick SETOUT position: "))
+(setq OSMD (getvar "OSMODE"))
+(setvar "OSMODE" 0)
+(cond
+    ((= setout "T")
+        (setq C1 (polar CE1 (stl_dtr 270) (* 0.5 D))))
+    ((= setout "B")
+        (setq C1 (polar CE1 (stl_dtr 90) (* 0.5 D))))
+    ((= setout "C")
+        (setq C1 CE1))
+)
+(command "_.layer" "set" out "")
+(setq	C2  (polar C1 (stl_dtr 0) CY)
+    AX1 (polar C1 (stl_dtr 0) (* 0.5 W))
+    AX2 (polar C1 (stl_dtr 180) (* 0.5 W))
+    CX1 (polar C2 (stl_dtr 90) (* 1.0 D))
+    CX2 (polar C2 (stl_dtr 270) (* 1.0 D))
+    P1  (polar C1 (stl_dtr 90) (* 0.5 D))
+    P2  (polar C1 (stl_dtr 270) (* 0.5 D))
+    TP1 (polar P1 (stl_dtr 0) WT)
+    TP2 (polar P2 (stl_dtr 0) WT)
+    P3  (polar P2 (stl_dtr 0) W)
+    P10 (polar P1 (stl_dtr 0) W)
+    P4  (polar P3 (stl_dtr 90) FT)
+    P9  (polar P10 (stl_dtr 270) FT)
+    P5  (polar P4 (stl_dtr 180) (- W (+ WT R)))
+    P8  (polar P9 (stl_dtr 180) (- W (+ WT R)))
+    P6  (polar TP2 (stl_dtr 90) (+ FT R))
+    P7  (polar TP1 (stl_dtr 270) (+ FT R)))
+(command "_.pline"   P1    "w"   0	 0     P2    P3	   P4	 P5
+    "a"	 P6    "l"   P7	   "a"	 P8    "l"   P9	   P10	 P1
+    "c")
+(setq ITEM1 (entlast))
+;(command "scale" item1 "" c1 "0.01")   ;Baios
+(command "_.layer" "set" cen "")
+(command "_.line" AX1 AX2 "")
+(setq CL1 (entlast))
+(command "_.line" CX1 CX2 "")
+(setq CL2 (entlast))
+(setvar "OSMODE" OSMD)
+(setvar "cmdecho" 1)
+(command "_.rotate" ITEM1 CL1 CL2 "" CE1)
+(while (eq 1 (logand 1 (getvar "cmdactive")))
+    (command pause))
+(setvar "cmdecho" 0)
+(STL_VAR_RESET)
+)
+;*********Draws R.S. JOIST X-SECTION************************************************************************************
+(defun RSJ_XSECT (/    TP1 TP2	TP3  TP4  TP5  TP6  TP7  TP8  TP9
+    TP10 TP11 TP12 TP13 TP14 TP15	TP16 TP17 TP18 TP19
+    TP20 TR1  TR2	 TR3  TR4  TR5	TR6  TR7  TR8  ITEM1
+    CL1  CL2  CL3	 CL4  D	   W	WT   FT	  R    RX
+    CE1  C1   PX1	 PX2  AX1  AX2	CX1  CX2  P1   P2
+    P3   P4   P5	 P6   P7   P8	P9   P10  P11  P12
+    P13  P14  P15	 P16  P17  P18	P19  P20)
+(STL_DATA)
+(setq CE1 (getpoint "\nPick Pos'n of SETOUT point: "))
+(setq OSMD (getvar "OSMODE"))
+(setvar "OSMODE" 0)
+(cond
+    ((= setout "T")
+        (setq C1 (polar CE1 (stl_dtr 270) (* 0.5 D))))
+    ((= setout "C") 
+        (setq C1 CE1)))
+(command "layer" "set" out "")
+(setq	PX1  (polar C1 (stl_dtr 270) (* 0.5 D))
+    PX2  (polar C1 (stl_dtr 90) (* 0.5 D))
+    AX1  (polar C1 (stl_dtr 90) (* 1.5 D))
+    AX2  (polar C1 (stl_dtr 270) (* 1.5 D))
+    CX1  (polar C1 (stl_dtr 0) (* 1.5 W))
+    CX2  (polar C1 (stl_dtr 180) (* 1.5 W))
+    TP1  (polar PX1 (stl_dtr 180) (+ R (* 0.5 WT)))
+    TP2  (polar PX1 (stl_dtr 180) (+ (* 0.25 (- W WT)) (* 0.5 WT)))
+    TP3  (polar PX1 (stl_dtr 180) (- (* 0.5 W) RX))
+    TP4  (polar PX1 (stl_dtr 0) (+ R (* 0.5 WT)))
+    TP5  (polar PX1 (stl_dtr 0) (+ (* 0.25 (- W WT)) (* 0.5 WT)))
+    TP6  (polar PX1 (stl_dtr 0) (- (* 0.5 W) RX))
+    TP7  (polar PX2 (stl_dtr 180) (+ R (* 0.5 WT)))
+    TP8  (polar PX2 (stl_dtr 180) (+ (* 0.25 (- W WT)) (* 0.5 WT)))
+    TP9  (polar PX2 (stl_dtr 180) (- (* 0.5 W) RX))
+    TP10 (polar PX2 (stl_dtr 0) (+ R (* 0.5 WT)))
+    TP11 (polar PX2 (stl_dtr 0) (+ (* 0.25 (- W WT)) (* 0.5 WT)))
+    TP12 (polar PX2 (stl_dtr 0) (- (* 0.5 W) RX))
+    TP13 (polar TP2 (stl_dtr 90) FT)
+    TP14 (polar TP5 (stl_dtr 90) FT)
+    TP15 (polar TP8 (stl_dtr 270) FT)
+    TP16 (polar TP11 (stl_dtr 270) FT)
+    TP17 (polar TP13 (stl_dtr 98) R)
+    TP18 (polar TP14 (stl_dtr 82) R)
+    TP19 (polar TP15 (stl_dtr 262) R)
+    TP20 (polar TP16 (stl_dtr 278) R)
+    TP21 (polar TP17 (stl_dtr 188) W)
+    TP22 (polar TP18 (stl_dtr 352) W)
+    TP23 (polar TP19 (stl_dtr 172) W)
+    TP24 (polar TP20 (stl_dtr 8) W)
+    TP25 (polar TP13 (stl_dtr 278) RX)
+    TP26 (polar TP14 (stl_dtr 262) RX)
+    TP27 (polar TP15 (stl_dtr 82) RX)
+    TP28 (polar TP16 (stl_dtr 98) RX)
+    TP29 (polar TP25 (stl_dtr 188) W)
+    TP30 (polar TP26 (stl_dtr 352) W)
+    TP31 (polar TP27 (stl_dtr 172) W)
+    TP32 (polar TP28 (stl_dtr 8) W)
+    TR1  (inters TP25 TP29 TP3 TP9 nil)
+    TR2  (inters TP26 TP30 TP6 TP12 nil)
+    TR3  (inters TP27 TP31 TP3 TP9 nil)
+    TR4  (inters TP28 TP32 TP6 TP12 nil)
+    TR5  (inters TP17 TP21 TP1 TP7 nil)
+    TR6  (inters TP18 TP22 TP4 TP10 nil)
+    TR7  (inters TP19 TP23 TP1 TP7 nil)
+    TR8  (inters TP20 TP24 TP4 TP10 nil)
+    P1   (polar PX1 (stl_dtr 180) (* 0.5 W))
+    P2   (polar TR1 (stl_dtr 180) RX)
+    P3   (polar TR1 (stl_dtr 98) RX)
+    P4   (polar TR5 (stl_dtr 278) R)
+    P5   (polar TR5 (stl_dtr 0) R)
+    P6   (polar TR7 (stl_dtr 0) R)
+    P7   (polar TR7 (stl_dtr 82) R)
+    P8   (polar TR3 (stl_dtr 262) RX)
+    P9   (polar TR3 (stl_dtr 180) RX)
+    P10  (polar PX2 (stl_dtr 180) (* 0.5 W))
+    P11  (polar PX2 (stl_dtr 0) (* 0.5 W))
+    P12  (polar TR4 (stl_dtr 0) RX)
+    P13  (polar TR4 (stl_dtr 278) RX)
+    P14  (polar TR8 (stl_dtr 98) R)
+    P15  (polar TR8 (stl_dtr 180) R)
+    P16  (polar TR6 (stl_dtr 180) R)
+    P17  (polar TR6 (stl_dtr 262) R)
+    P18  (polar TR2 (stl_dtr 82) RX)
+    P19  (polar TR2 (stl_dtr 0) RX)
+    P20  (polar PX1 (stl_dtr 0) (* 0.5 W)))
+(command "_.pline"   P1    "w"   0	 0     P2    "a"   P3	 "l"
+    P4	 "a"   P5    "l"   P6	 "a"   P7    "l"   P8	 "a"
+    P9	 "l"   P10   P11   P12	 "a"   P13   "l"   P14	 "a"
+    P15	 "l"   P16   "a"   P17	 "l"   P18   "a"   P19	 "l"
+    P20	 "c")
+(setq ITEM1 (entlast))
+;(command "scale" item1 "" c1 "0.01")   ;Baios
+(command "_.layer" "set" cen "")
+(command "_.line" C1 AX1 "")
+(setq CL1 (entlast))
+(command "_.line" C1 AX2 "")
+(setq CL2 (entlast))
+(command "_.line" C1 CX1 "")
+(setq CL3 (entlast))
+(command "_.line" C1 CX2 "")
+(setq CL4 (entlast))
+(setvar "OSMODE" OSMD)
+(setvar "cmdecho" 1)
+(command "_.rotate" ITEM1 CL1 CL2 CL3 CL4 "" CE1)
+(while (eq 1 (logand 1 (getvar "cmdactive")))
+    (command pause))
+(setvar "cmdecho" 0)
+(STL_VAR_RESET)
+)
+;*********Draws STRUCTURAL TEE X-SECTION********************************************************************************
+(defun STEE_XSECT (/	CE1  C1	  P1   P2   P3	 P4   P5   P6	P7
+    P8	P9   P10  P11  ITEM1	 PX1  PX2  PY1	PY2
+    CL1	CL2  CL3  CL4)
+(STL_DATA)
+(setq CE1 (getpoint "\nPick SETOUT position: "))
+(setq OSMD (getvar "OSMODE"))
+(setvar "OSMODE" 0)
+(cond
+    ((= setout "B") 
+        (setq C1 (polar CE1 (stl_dtr 270) D)))
+    ((= setout "A")
+        (setq C1 (polar CE1 (stl_dtr 270) (- D CX))))
+    ((= setout "T") 
+        (setq C1 CE1)))
+(command "_.layer" "set" out "")
+(setq	P1  (polar C1 (stl_dtr 90) D)
+    PA  (polar P1 (stl_dtr 270) CX)
+    P2  (polar P1 (stl_dtr 180) (* 0.5 W))
+    P11 (polar P1 (stl_dtr 0) (* 0.5 W))
+    P3  (polar P2 (stl_dtr 270) FT)
+    P10 (polar P11 (stl_dtr 270) FT)
+    P4  (polar P3 (stl_dtr 0) (- (* 0.5 W) (+ R (* 0.5 WT))))
+    P9  (polar P10 (stl_dtr 180) (- (* 0.5 W) (+ R (* 0.5 WT))))
+    P6  (polar C1 (stl_dtr 180) (* 0.5 WT))
+    P7  (polar C1 (stl_dtr 0) (* 0.5 WT))
+    P5  (polar P6 (stl_dtr 90) (- D (+ R FT)))
+    P8  (polar P7 (stl_dtr 90) (- D (+ R FT))))
+(command "_.pline"   P11   "w"   0	 0     P10   P9	   "a"	 P8
+    "l"	 P7    P6    P5	   "a"	 P4    "l"   P3	   P2	 P11
+    "c")
+(setq ITEM1 (entlast))
+;(command "scale" item1 "" c1 "0.01")   ;Baios
+(command "_.layer" "set" cen "")
+(setq	PX1 (polar PA (stl_dtr 90) (* 1.5 D))
+    PX2 (polar PA (stl_dtr 270) (* 1.5 D))
+    PY1 (polar PA (stl_dtr 0) W)
+    PY2 (polar PA (stl_dtr 180) W))
+(command "_.line" PA PX1 "")
+(setq CL1 (entlast))
+(command "_.line" PA PX2 "")
+(setq CL2 (entlast))
+(command "_.line" PA PY1 "")
+(setq CL3 (entlast))
+(command "_.line" PA PY2 "")
+(setq CL4 (entlast))
+(setvar "OSMODE" OSMD)
+(setvar "cmdecho" 1)
+(command "_.rotate" ITEM1 CL1 CL2 CL3 CL4 "" CE1)
+(while (eq 1 (logand 1 (getvar "cmdactive")))
+    (command pause))
+(setvar "cmdecho" 0)
+(STL_VAR_RESET)
+)
+;*********Draws RSCTOP STEE ERSA URSA SIDE VIEWS************************************************************************
+(defun RSA_SIDE	(/ CE1 CE2 Z AX	CX CY C1 C2 P1 P2 P3 P4	P5 P6 PT1 F1 txins ang1)
+    (STL_DATA)
+    (setq Z D)
+    (if (or (= sect "RSC") 
+        (= sect "U") 
+        (= sect "UPN"))
+    (setq   AX CY
+        Z  W
+        FT WT))
+    (if (= sect "PFC")
+        (setq   AX CY
+            Z  W
+            FT WT))
+    (if (= sect "ERSA")
+        (setq AX CX))
+    (if (and (= sect "URSA")
+        (= view "SIDE_SHORT"))
+    (setq   AX CY
+        Z  W))
+    (if (and (= sect "URSA")
+        (= view "SIDE_LONG"))
+    (setq AX CX))
+    (if (or (= sect "STEEUB")
+        (= sect "STEEUC")
+        (= sect "RTEE"))
+    (setq AX CX))
+    (STL_ST_FIN)
+    (setq ang1 (angle CE1 CE2))
+    (setq OSMD (getvar "OSMODE"))
+    (setvar "OSMODE" 0)
+    (command "_.layer" "set" out "")
+    (cond
+        ((= setout "A")
+            (setq   C1 CE1
+                C2 CE2))
+        ((= setout "B")
+            (progn 
+                (setq   C1 (polar CE1 (- ang1 (stl_dtr 90)) AX)
+                    C2 (polar CE2 (- ang1 (stl_dtr 90)) AX))))
+        ((= setout "T")
+            (progn 
+                (setq   C1 (polar CE1 (+ ang1 (stl_dtr 90)) (- Z AX))
+                    C2 (polar CE2 (+ ang1 (stl_dtr 90)) (- Z AX))))))
+    (setq	P1  (polar C1 (+ ang1 (stl_dtr 90)) AX)
+        P2  (polar C2 (+ ang1 (stl_dtr 90)) AX)
+        P3  (polar C1 (+ ang1 (stl_dtr 90)) (- AX FT))
+        P4  (polar C2 (+ ang1 (stl_dtr 90)) (- AX FT))
+        P5  (polar C1 (- ang1 (stl_dtr 90)) (- Z AX))
+        P6  (polar C2 (- ang1 (stl_dtr 90)) (- Z AX))
+        PT1 (polar P1 (- ang1 (stl_dtr 90)) (* 0.5 (distance P1 P5))))
+    (command "_.line" P1 P2 "" "_.line" P3 P4 "")
+    (setq F1 (entlast))
+    (command "_.line" P5 P6 "" "_.line" P5 P1 "" "_.line"	P6 P2 "")
+    (if (or (= toe_fh "H")
+        (= sect "RSC")
+        (= sect "PFC"))
+    (command "_.change" F1 "" "prop" "layer" hid ""))
+    (command "_.layer" "set" cen "" "_.line" C1 C2 "")
+    (setq toe_fh nil)
+    (setvar "OSMODE" OSMD)
+    (STL_VAR_RESET)
+)
+;*********Draws R.S.ANGLE X-SECTION*************************************************************************************
+(defun RSA_XSECT (/     CE1 W   P1  P2  P3  P4  P5  P6  P7  P8  P9  PX
+    PY  Y1  YY1 YY2 X1  XX1 XX2 CL1 CL2 D	FT  R   RX  CX)
+(STL_DATA)
+(setq CE1 (getpoint "\nPick Pos'n of SETOUT point: "))
+(setq OSMD (getvar "OSMODE"))
+(setvar "OSMODE" 0)
+(if (= sect "ERSA")
+    (setq W D))
+;*********EQUAL ANGLE LEFT HANDED
+(if (and (= sect "ERSA") 
+    (= view "XSECT_L"))
+(progn 
+    (cond 
+        ((= setout "B") 
+            (setq P1 CE1))
+        ((= setout "A") 
+            (setq P1 (polar CE1 (stl_dtr 0) CX)))
+        ((= setout "T") 
+            (setq P1 (polar CE1 (stl_dtr 0) W))))
+    (setq   P2  (polar P1 (stl_dtr 180) W)
+        P9  (polar P1 (stl_dtr 90) D)
+        Y1  (polar P1 (stl_dtr 180) CX)
+        YY1 (polar Y1 (stl_dtr 270) (* 0.5 D))
+        YY2 (polar Y1 (stl_dtr 90) (* 0.5 D))
+        X1  (polar P1 (stl_dtr 90) CX)
+        XX1 (polar X1 (stl_dtr 0) (* 0.5 D))
+        XX2 (polar X1 (stl_dtr 180) (* 0.5 D))
+        PY  (polar P2 (stl_dtr 90) FT)
+        PX  (polar P9 (stl_dtr 180) FT)
+        P3  (polar PY (stl_dtr 270) RX)
+        P4  (polar PY (stl_dtr 0) RX)
+        P8  (polar PX (stl_dtr 0) RX)
+        P7  (polar PX (stl_dtr 270) RX)
+        P5  (polar PY (stl_dtr 0) (- W (+ FT R)))
+        P6  (polar PX (stl_dtr 270) (- D (+ FT R))))))
+;*********EQUAL ANGLE RIGHT HANDED
+    (if (and (= sect "ERSA") 
+        (= view "XSECT_R"))
+    (progn 
+        (cond 
+            ((= setout "B") 
+                (setq P1 CE1))
+            ((= setout "A") 
+                (setq P1 (polar CE1 (stl_dtr 180) CX)))
+            ((= setout "T") 
+                (setq P1 (polar CE1 (stl_dtr 180) W))))
+        (setq   P2  (polar P1 (stl_dtr 0) W)
+            P9  (polar P1 (stl_dtr 90) D)
+            Y1  (polar P1 (stl_dtr 0) CX)
+            YY1 (polar Y1 (stl_dtr 270) (* 0.5 D))
+            YY2 (polar Y1 (stl_dtr 90) (* 0.5 D))
+            X1  (polar P1 (stl_dtr 90) CX)
+            XX1 (polar X1 (stl_dtr 0) (* 0.5 D))
+            XX2 (polar X1 (stl_dtr 180) (* 0.5 D))
+            PY  (polar P2 (stl_dtr 90) FT)
+            PX  (polar P9 (stl_dtr 0) FT)
+            P3  (polar PY (stl_dtr 270) RX)
+            P4  (polar PY (stl_dtr 180) RX)
+            P8  (polar PX (stl_dtr 180) RX)
+            P7  (polar PX (stl_dtr 270) RX)
+            P5  (polar PY (stl_dtr 180) (- W (+ FT R)))
+            P6  (polar PX (stl_dtr 270) (- D (+ FT R))))))
+    ;*********UNEQUAL ANGLE SHORT LEFT HANDED
+    (if (and (= sect "URSA")
+        (= view "XSECT_SHORT_LEFT"))
+    (progn 
+        (cond 
+            ((= setout "B") 
+                (setq P1 CE1))
+            ((= setout "A") 
+                (setq P1 (polar CE1 (stl_dtr 0) CY)))
+            ((= setout "T") 
+                (setq P1 (polar CE1 (stl_dtr 0) W))))
+    (setq   P2  (polar P1 (stl_dtr 180) W)
+        P9  (polar P1 (stl_dtr 90) D)
+        Y1  (polar P1 (stl_dtr 180) CY)
+        YY1 (polar Y1 (stl_dtr 270) (* 0.5 D))
+        YY2 (polar Y1 (stl_dtr 90) (* 0.5 D))
+        X1  (polar P1 (stl_dtr 90) CX)
+        XX1 (polar X1 (stl_dtr 0) (* 0.5 D))
+        XX2 (polar X1 (stl_dtr 180) (* 0.5 D))
+        PY  (polar P2 (stl_dtr 90) FT)
+        PX  (polar P9 (stl_dtr 180) FT)
+        P3  (polar PY (stl_dtr 270) RX)
+        P4  (polar PY (stl_dtr 0) RX)
+        P8  (polar PX (stl_dtr 0) RX)
+        P7  (polar PX (stl_dtr 270) RX)
+        P5  (polar PY (stl_dtr 0) (- W (+ FT R)))
+        P6  (polar PX (stl_dtr 270) (- D (+ FT R))))))
+;*********UNEQUAL ANGLE SHORT RIGHT HANDED
+    (if (and (= sect "URSA") 
+        (= view "XSECT_SHORT_RIGHT"))
+    (progn 
+        (cond 
+            ((= setout "B") 
+                (setq P1 CE1))
+            ((= setout "A") 
+                (setq P1 (polar CE1 (stl_dtr 180) CY)))
+            ((= setout "T") 
+                (setq P1 (polar CE1 (stl_dtr 180) W))))
+    (setq   P2  (polar P1 (stl_dtr 0) W)
+        P9  (polar P1 (stl_dtr 90) D)
+        Y1  (polar P1 (stl_dtr 0) CY)
+        YY1 (polar Y1 (stl_dtr 270) (* 0.5 D))
+        YY2 (polar Y1 (stl_dtr 90) (* 0.5 D))
+        X1  (polar P1 (stl_dtr 90) CX)
+        XX1 (polar X1 (stl_dtr 0) (* 0.5 D))
+        XX2 (polar X1 (stl_dtr 180) (* 0.5 D))
+        PY  (polar P2 (stl_dtr 90) FT)
+        PX  (polar P9 (stl_dtr 0) FT)
+        P3  (polar PY (stl_dtr 270) RX)
+        P4  (polar PY (stl_dtr 180) RX)
+        P8  (polar PX (stl_dtr 180) RX)
+        P7  (polar PX (stl_dtr 270) RX)
+        P5  (polar PY (stl_dtr 180) (- W (+ FT R)))
+        P6  (polar PX (stl_dtr 270) (- D (+ FT R))))))
+;*********UNEQUAL ANGLE LONG LEFT HANDED
+    (if (and (= sect "URSA") 
+        (= view "XSECT_LONG_LEFT"))
+    (progn 
+        (cond 
+            ((= setout "B") 
+                (setq P1 CE1))
+            ((= setout "A") 
+                (setq P1 (polar CE1 (stl_dtr 0) CX)))
+            ((= setout "T") 
+                (setq P1 (polar CE1 (stl_dtr 0) D))))
+    (setq   P2  (polar P1 (stl_dtr 180) D)
+        P9  (polar P1 (stl_dtr 90) W)
+        Y1  (polar P1 (stl_dtr 180) CX)
+        YY1 (polar Y1 (stl_dtr 270) (* 0.5 D))
+        YY2 (polar Y1 (stl_dtr 90) (* 0.5 D))
+        X1  (polar P1 (stl_dtr 90) CY)
+        XX1 (polar X1 (stl_dtr 0) (* 0.5 D))
+        XX2 (polar X1 (stl_dtr 180) (* 0.5 D))
+        PY  (polar P2 (stl_dtr 90) FT)
+        PX  (polar P9 (stl_dtr 180) FT)
+        P3  (polar PY (stl_dtr 270) RX)
+        P4  (polar PY (stl_dtr 0) RX)
+        P8  (polar PX (stl_dtr 0) RX)
+        P7  (polar PX (stl_dtr 270) RX)
+        P5  (polar PY (stl_dtr 0) (- D (+ FT R)))
+        P6  (polar PX (stl_dtr 270) (- W (+ FT R))))))
+    ;*********UNEQUAL ANGLE LONG RIGHT HANDED
+    (if (and (= sect "URSA") 
+        (= view "XSECT_LONG_RIGHT"))
+    (progn 
+        (cond 
+            ((= setout "B") 
+                (setq P1 CE1))
+            ((= setout "A") 
+                (setq P1 (polar CE1 (stl_dtr 180) CX)))
+            ((= setout "T") 
+                (setq P1 (polar CE1 (stl_dtr 180) D))))
+        (setq   P2  (polar P1 (stl_dtr 0) D)
+            P9  (polar P1 (stl_dtr 90) W)
+            Y1  (polar P1 (stl_dtr 0) CX)
+            YY1 (polar Y1 (stl_dtr 270) (* 0.5 D))
+            YY2 (polar Y1 (stl_dtr 90) (* 0.5 D))
+            X1  (polar P1 (stl_dtr 90) CY)
+            XX1 (polar X1 (stl_dtr 0) (* 0.5 D))
+            XX2 (polar X1 (stl_dtr 180) (* 0.5 D))
+            PY  (polar P2 (stl_dtr 90) FT)
+            PX  (polar P9 (stl_dtr 0) FT)
+            P3  (polar PY (stl_dtr 270) RX)
+            P4  (polar PY (stl_dtr 180) RX)
+            P8  (polar PX (stl_dtr 180) RX)
+            P7  (polar PX (stl_dtr 270) RX)
+            P5  (polar PY (stl_dtr 180) (- D (+ FT R)))
+            P6  (polar PX (stl_dtr 270) (- W (+ FT R))))))
+;****************************************************************
+    (command "_.layer" "set" out "")
+    (command "_.pline"   P1    "w"   0	 0     P2    P3	   "a"	 P4
+        "l"	 P5    "a"   P6	   "l"	 P7    "a"   P8	   "l"	 P9 "c")
+    (setq ITEM1 (entlast))
+    ;(command "scale" item1 "" c1 "0.01")   ;Baios
+    (command "_.layer" "set" cen "")
+    (command "_.line" XX1 XX2 "")
+    (setq CL1 (entlast))
+    (command "_.line" YY1 YY2 "")
+    (setq CL2 (entlast))
+    (setvar "OSMODE" OSMD)
+    (setvar "cmdecho" 1)
+    (command "_.rotate" ITEM1 CL1 CL2 "" CE1)
+    (while (eq 1 (logand 1 (getvar "cmdactive")))
+        (command pause))
+    (setvar "cmdecho" 0)
+    (STL_VAR_RESET)
+)
+;*********Draws HOLLOW SECTS & PIPE SIDE VIEW***************************************************************************
+(defun H_SIDE (/ CE1 CE2 Z WT C1 C2 P1 P2 P3 P4 A F1 F2 ang1)
+    (if (or (= sect "RHS") 
+        (= sect "SHS"))
+    (STL_HOLLOW_DATA))
+    (STL_ST_FIN)
+    (setq OSMD (getvar "OSMODE"))
+    (setvar "OSMODE" 0)
+    (setq ang1 (angle CE1 CE2))
+    (setq Z D)
+    (if (= view "SIDE_SHORT")
+        (setq Z W))
+    (setq WT (atof thick))
+    (if (= STLUNITS "INCH")
+        (setq   Z  (/ Z 1000)
+            WT (/ WT 1000)))
+    (cond
+        ((= setout "L")
+            (progn
+                (setq   C1	(polar CE1 (- ang1 (stl_dtr 90)) (* 0.5 Z))
+                    C2	(polar CE2 (- ang1 (stl_dtr 90)) (* 0.5 Z)))))
+        ((= setout "R")
+            (progn
+                (setq   C1	(polar CE1 (+ ang1 (stl_dtr 90)) (* 0.5 Z))
+                    C2	(polar CE2 (+ ang1 (stl_dtr 90)) (* 0.5 Z)))))
+        ((= setout "C")
+            (progn
+                (setq   C1	CE1
+                    C2	CE2))))
+    (setq	P1 (polar C1 (+ ang1 (stl_dtr 90)) (* 0.5 Z))
+        P2 (polar C2 (+ ang1 (stl_dtr 90)) (* 0.5 Z))
+        P3 (polar C1 (- ang1 (stl_dtr 90)) (* 0.5 Z))
+        P4 (polar C2 (- ang1 (stl_dtr 90)) (* 0.5 Z)))
+    (command "_.layer" "set" out "")
+    (command "_.line" P1 P2 "")
+    (setq A (entlast))
+    (command "_.copy"
+        A
+        ""
+        P1
+        (polar P1 (- ang1 (stl_dtr 90)) WT))
+    (setq F1 (entlast))
+    (command "_.line" P3 P4 "")
+    (setq A (entlast))