http://www.structuralsteeldetailer.us/?page_id=21" onclick="window.open(this.href);return false;
LSP files are text, code like this snippet.
Code: Select all
;--------------------------INTERNAL ERROR HANDLER---------------------;
(defun
STL_ERR (MSG)
(if (or (/= MSG "Function cancelled")
; If an error (such as ESC) occurs
(= MSG "quit / exit abort")
) ;_ end of or
(princ)
(princ (strcat "\nError: " MSG))
) ; while this command is active...
(setvar "OSMODE" OS) ; Restore saved modes
(setvar "PLINEWID" PLW)
(setq *ERROR* OLDERR) ; Restore old *error* handler
(princ)
) ;end STL_ERR
;------------------------------MAIN PROGRAM----------------------------;
(defun DTR (A) (* pi (/ A 180.0)))
;----------------------------------------------------------------------;
(defun RTD (A) (/ (* A 180.0) pi))
;----------------------------------------------------------------------;
;Read data file and parse "size string", nth 0, for display in
;list box as variable display_list.
(defun
STL_READ_DIM_FILE (/ A AA)
(STL_SET_NIL)
(setq A "")
(STL_DEFAULTS)
(STL_OPEN_DIM_FILE)
(while (/= A NIL)
(setq A (read-line STL_DIM_FILE))
(if (/= A NIL)
(progn
(setq
A (nth 0 (read A))
AA (append AA (list A))
) ;_ end of setq
) ;end progn
) ;end if
) ;end while
(setq DISPLAY_LIST (reverse AA))
(close STL_DIM_FILE)
(start_list "get_size")
(mapcar 'add_list DISPLAY_LIST)
(end_list)
) ;end STL_READ_DIM_FILE
;-----------------------------------------------------------------------;