home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / felixcad / fcaddata.z / FLX_APPM.LSP < prev    next >
Lisp/Scheme  |  1997-06-11  |  6KB  |  167 lines

  1. ;;; FLX_APPM.LSP
  2. ;;; ==================================================================
  3. ;;; Provided by Felix Computer Aided Technologies GmbH 1995-97
  4. ;;; ==================================================================
  5. ;;; Changed: Jan  20, 1996 / vp
  6. ;;; Changed: Sept 29, 1996 / vp
  7. ;;;          June 10, 1997 / vp (getfiled ... 16) for 3.0
  8. ;;; ==================================================================
  9. ;;; Application Managament Functions
  10. ;;; File is loaded from FLX_MAIN.LSP
  11. ;;; See also: LISTFILE in flx_lstf.lsp
  12. ;;; ==================================================================
  13.  
  14. ;;; ------------------------------------------------------------------
  15. ;;;  SET TEMPLATE DRAWING
  16.  
  17. (defun C:TEMPLATE ( / tile fn template flag)
  18.     (setfunhelp "C:TEMPLATE" "Template Drawing")
  19.     (setq title "Set template drawing")
  20.     (if (= (getvar "LANGUAGE") 1)(progn
  21.       (setfunhelp "C:TEMPLATE" "Vorlagezeichnung")
  22.       (setq title "Vorlagezeichnung setzen")
  23.     ))
  24.     (defun *ERROR*(msg) (setq *ERROR* nil)(princ))
  25.     (setq template (getvar "FCTEMPLATE"))
  26.     (setq flag 16)
  27.     (if (setq fn (getfiled title template "flx" flag)) ;; modified for 3.0 vp
  28.       (setvar "FCTEMPLATE" fn)
  29.     )
  30.     (setq *ERROR* nil) (princ)
  31. )
  32.  
  33. ;;; ------------------------------------------------------------------
  34. ;;; RUNMACRO
  35.  
  36. (defun C:RUNMACRO( / header cfg fn)
  37.     (setfunhelp "C:RUNMACRO" "MACRO")
  38.     (setq header "Run Macro File")
  39.     (if (= (getvar "LANGUAGE") 1)(progn
  40.       (setfunhelp "C:RUNMACRO" "MACRO")
  41.       (setq header "Macro Datei ausfⁿhren")
  42.     ))
  43.     (defun *ERROR*(msg) (setq *ERROR* nil)(setvar "FILEDIA" 1)(princ))
  44.     (if (setq fn (getfiled header "" "mcr" 0))
  45.       (progn
  46.          (setvar "FILEDIA" 0)
  47.          (command ".MACRO" fn)
  48.       )
  49.     )
  50.     (setvar "FILEDIA" 1)
  51.     (setq *ERROR* nil)
  52.     (princ)
  53. )
  54.  
  55. ;;; ------------------------------------------------------------------
  56. ;;; DLGEDIT: Calls the Dialog and Menu Editor (dme.exe)
  57.  
  58. (defun C:DLGEDIT( / prt_list fn fn2)
  59.     (setfunhelp "C:DLGEDIT" "Resource Manager")
  60.     (setq prt_list '(
  61.        "Call Dialog and Menu Editor"
  62.        "No file specified to be edited with DME."
  63.     ))
  64.     (if (= (getvar "LANGUAGE") 1)(progn
  65.       (setfunhelp "C:DLGEDIT" "Applikations-Manager")
  66.       (setq prt_list '(
  67.          "Menⁿ- und Dialogeditor aufrufen"
  68.          "Keine Datei spezifiziert, die mit DME bearbeitet werden soll." 
  69.       ))
  70.     ))
  71.     (if (setq fn (getfiled (nth 0 prt_list) "" "mnp,mnu,dlg" 0))
  72.        (progn
  73.          (setq fn2 (if (setq fn2 (findfile "dme.exe")) fn2 "dme.exe"))
  74.          (if (findfile fn)
  75.            (CALL_WINEXE (strcat fn2 " -d " fn))
  76.            (CALL_WINEXE (strcat fn2))
  77.          )
  78.        )
  79.        (princ (nth 1 prt_list))
  80.     )
  81.     (princ)
  82.  
  83. ;;; ------------------------------------------------------------------
  84. ;;; BMPEDIT: Calls Bitmap Editor / Uses: pbrush.exe 
  85.  
  86. (defun C:BMPEDIT( / prt_list fn)
  87.     (setfunhelp "C:BMPEDIT" "Resource Manager")
  88.     (setq prt_list '(
  89.        "Edit Bitmap using Pbrush"
  90.        "No bitmap file specified to be edited with PBRUSH."
  91.     ))
  92.     (if (= (getvar "LANGUAGE") 1)(progn
  93.       (setfunhelp "C:BMPEDIT" "Applikations-Manager")
  94.       (setq prt_list '(
  95.          "Bitmap mit Pbrush editieren"
  96.          "Keine Bitmap-Datei spezifiziert, die mit PBRUSH bearbeitet werden soll." 
  97.       ))
  98.     ))
  99.     (if (setq fn (getfiled (nth 0 prt_list) "" "bmp" 0))
  100.        (CALL_WINEXE (strcat "pbrush.exe" " " fn))
  101.        (princ (nth 1 prt_list))
  102.     )
  103.     (princ)
  104. )
  105.  
  106. ;;; ------------------------------------------------------------------
  107. ;;; EDITOR: Calls Windows Text Editor / Uses: notepad.exe
  108.  
  109. (defun C:EDITOR( / header fn)
  110.     (setfunhelp "C:EDITOR" "Resource Manager")
  111.     (setq header "Call Notepad Editor")
  112.     (if (= (getvar "LANGUAGE") 1)(progn
  113.       (setfunhelp "C:EDITOR" "Applikations-Manager")
  114.       (setq header "Notepad Editor aufrufen")
  115.     ))
  116.     (if (setq fn (getfiled header ""  "txt,lsp,lin,pat,*" 0))
  117.        (CALL_WINEXE (strcat "notepad.exe" " " fn))
  118.     )
  119.     (princ)
  120. )
  121.  
  122. ;;; ------------------------------------------------------------------
  123. ;;; EDITLISP: Calls Windows Text Editor / Uses: notepad.exe
  124.  
  125. (defun C:EDITLISP( / header fn)
  126.     (setfunhelp "C:LISTFILE" "Lisp")
  127.     (setq header "Edit Lisp File using Notepad")
  128.     (if (= (getvar "LANGUAGE") 1)(progn
  129.       (setfunhelp "C:LISTFILE" "Applikations-Manager")
  130.       (setq header "Lisp-Datei mit Notepad Editor bearbeiten")
  131.     ))
  132.     (if (setq fn (getfiled header "" "lsp" 0))
  133.       (CALL_WINEXE (strcat "notepad.exe" " " fn))
  134.     )
  135.     (princ)
  136. )
  137.  
  138. ;;; ------------------------------------------------------------------
  139. ;;; LOADLISP: Load Lisp Routines 
  140.  
  141. (defun C:LOADLISP( / prt_list fd fn fx)
  142.     (setfunhelp "C:LOADLISP" "Lisp")
  143.     (setq prt_list '("Load Lisp File" "Loading " " Done."))
  144.     (if (= (getvar "LANGUAGE") 1) (progn
  145.       (setfunhelp "C:LOADLISP" "Applikations-Manager")
  146.       (setq prt_list '("Lisp Datei laden" "Lade" " Fertig."))
  147.     ))
  148.     (FLX_FUNC_INIT)
  149.     (setq fd (findfile (setq fx "textout.lsp"))) 
  150.     (setq fd (if fd (substr fd 1 (- (strlen fd) (strlen fx))) "" ))
  151.     (if (setq fn (getfiled (nth 0 prt_list) fd "lsp" 0)) ;;; open!
  152.       (progn
  153.          (princ (strcat (nth 1 prt_list) (strcase fn) "..."))
  154.          (load fn)
  155.          (setq FLX$LOADLISP fn)
  156.          (princ (nth 2 prt_list))
  157.       )
  158.     )
  159.     (setq *ERROR* nil)
  160.     (FLX_FUNC_EXIT)
  161. )
  162.  
  163. ;;; ==================================================================
  164.  
  165. (princ)
  166.