;;--------------------------------------------------------------------------* ;; Copyright 20082 DC4 Technisches Büro GmbH * ;; * ;;--------------------------------------------------------------------------* ;; Dateiname: multiplesteplsp ;; Version : 1.0 ;; Datum : 26.05.2010 ;; Author : Gt ;;--------------------------------------------------------------------------* (in-package :custom) (use-package :OLI) ;;--------------------------------------------------------------------------* (sd-defdialog 'dc4-speichere-teile-step-dialog :dialog-title "STEP speichern" ;;:dialog-control :sequential :variables '( (verz :value-type :string :prompt-text "Verzeichnis zum Speichern angeben" :title "Verzeichnis" :initial-value (sd-get-current-working-directory) :check-function #'(lambda (dir) (if (sd-directory-p (format nil "~a//" dir)) :ok (values :error "Dieses Verzeichnis existiert nicht!"))) ) (over :value-type :boolean :toggle-type :wide-toggle :title "Ueberschreiben" :initial-value nil ) (parts :selection (*sd-part-seltype*) :multiple-items t :show-select-menu t :title "Teile" ) ) :local-functions '((doit-action () (let (datei index teil) (dolist (teil parts) (setf datei (format nil "~a//~a.stp" verz (sd-inq-obj-contents-name teil))) (if over (progn (sd-call-cmds (step_export :select teil :filename datei :overwrite)) );;progn (progn (setf index 1) (loop (if (sd-inq-file-status datei :existence) (progn (setf datei (format nil "~a//~a-~a.stp" verz (sd-inq-obj-contents-name teil) index)) (setf index (+ index 1)) );;progn (return nil) );;if );;loop (sd-call-cmds (step_export :select teil :filename datei)) );;progn );;if );;dolist );;let ) ) :ok-action '(doit-action) :help-action '() )