;;--------------------------------------------------------------------------* ;; Copyright 2003 DC4 Technisches Büro GmbH * ;; * ;;--------------------------------------------------------------------------* ;; Dateiname: anslist.lsp ;; Version : 1.0 ;; Datum : 01.09.2003 ;; Author : Gt ;;--------------------------------------------------------------------------* (in-package :custom) (use-package :OLI) ;;--------------------------------------------------------------------------* ;; dialogs * ;;--------------------------------------------------------------------------* (sd-defdialog 'dc4-ansichtsliste-laden-dialog :dialog-title "Lade Ansichtsliste" ;;:dialog-control :sequential :variables '( (datei :value-type :filename :direction :input :prompt-text "Dateiname der Ansichtsliste angeben" :title "Datei" :size :third ) ) :local-functions '() :ok-action '(sd-call-cmds (dc4-lade-ansichtsliste (first datei))) ) ;;--------------------------------------------------------------------------* (sd-defdialog 'dc4-ansichtsliste-speichern-dialog :dialog-title "Speichere Ansichtsliste" ;;:dialog-control :sequential :variables '( (datei :value-type :filename :direction :output :prompt-text "Dateiname der Ansichtsliste angeben" :title "Datei" :if-exists :confirm-overwrite :size :third ) ) :local-functions '() :ok-action '(sd-call-cmds (dc4-speichere-ansichtsliste (first datei))) ) ;;--------------------------------------------------------------------------* ;; functions * ;;--------------------------------------------------------------------------* ;;--------------------------------------------------------------------------* ;; Funktion: dc4-speichere-ansichtsliste * ;; speichert drawlist als file * ;; * ;; Parameter : * ;; datei ... {STRING} * ;; * ;; * ;; Returnwert: keiner * ;; * ;; Geppert 01.09.2003 * ;;-------------------------------------------------------------------------*/ (defun dc4-speichere-ansichtsliste (datei) (let (strm sichtblist sichtb) (setf strm (open datei :direction :output)) (setf sichtblist (sd-inq-vp-drawlist-objects (oli::sd-inq-current-vp))) (dolist (sichtb sichtblist) (format strm "~a~%" (sd-inq-obj-pathname sichtb)) );;dolist (close strm) );;let ) ;;--------------------------------------------------------------------------* ;; Funktion: dc4-lade-ansichtsliste * ;; laedt drawlist aus file * ;; * ;; Parameter : * ;; datei ... {STRING} * ;; * ;; * ;; Returnwert: keiner * ;; * ;; Geppert 01.09.2003 * ;;-------------------------------------------------------------------------*/ (defun dc4-lade-ansichtsliste (datei) (sd-call-cmds (clear_vp (oli::sd-inq-current-vp))) (with-open-file (strm datei :direction :input) (do ((line (read-line strm nil 'eof) (read-line strm nil 'eof) )) ((eql line 'eof)) (when (sd-pathname-to-obj line) (sd-call-cmds (add_to_vp_drawlist (oli::sd-inq-current-vp) :with-wp (sd-pathname-to-obj line))) );;when );;do );;with )