;;--------------------------------------------------------------------------* ;; Copyright 2009 DC4 Technisches Büro GmbH * ;; * ;;--------------------------------------------------------------------------* ;; Dateiname: lisppart.lsp ;; Version : 1.0 ;; Datum : 30.04.2009 ;; Author : Gt ;;--------------------------------------------------------------------------* ;; Modulbeschreibung: Importteile ohne MM-Voodoo * ;; * ;;--------------------------------------------------------------------------* ;;;--------------------------------------------------------------------------* ;; in-packages * ;;--------------------------------------------------------------------------* (in-package :custom) ;;--------------------------------------------------------------------------* ;; use-packages * ;;--------------------------------------------------------------------------* (use-package :OLI) ;;--------------------------------------------------------------------------* ;; dialogs * ;;--------------------------------------------------------------------------* (sd-defdialog 'dc4-load-lisppart-dialog :dialog-title "LISP-Teile" :dialog-type :terminate :variables '( (datei :value-type :filename :direction :input :prompt-text "Dateiname der LISP-Datei angeben" :title "Datei" :size :third :filename-incl-path t :initialPattern "*.lsp" :initialdirectory (sd-get-current-working-directory) ) ) :local-functions '( (ok-action () (let (istrm osrtm tmplisp) (if (sd-sys-getenv "TEMP") (setf tmplisp (format nil "~a/tmplisp.lsp" (sd-sys-getenv "TEMP"))) (setf tmplisp "C:/temp/tmplisp.lsp") );;if (setf ostrm (open tmplisp :direction :output)) (with-open-file (istrm (first datei) :direction :input) (do ((line (read-line istrm nil 'eof) (read-line istrm nil 'eof) )) ((eql line 'eof)) (setf line (sd-string-replace line "ModelManager" "MogelManager")) (setf line (sd-string-replace line "sd-attach-item-attribute" "list")) (setf line (sd-string-replace line "sd-set-library-attr" "list")) (format ostrm "~a~%" line) );;do );;with (close ostrm) (load tmplisp) );;let ) ) :ok-action '(ok-action) :help-action '() )