;;--------------------------------------------------------------------------* ;; Copyright 2002 DC4 Technisches Büro GmbH * ;; * ;;--------------------------------------------------------------------------* ;; Dateiname: genau.lsp ;; Version : 1.0 ;; Datum : 04.04.2002 ;; Author : Gt ;;--------------------------------------------------------------------------* (in-package :custom) (use-package :OLI) ;;--------------------------------------------------------------------------* (sd-defdialog 'dc4-genauigkeit-suchen-dialog :dialog-title "Genauigkeit suchen" :variables '( ;;local (back-state :initial-value nil) ;;dialog (bgr :value-type :assembly :prompt-text "Baugruppe angeben" :title "Baugruppe" :modifies :nil ) (genau :value-type :number :prompt-text "Minimale Genauigkeit eingeben" :title "Genauigkeit" :initial-value 0.000001 ) (incl :value-type :boolean :toggle-type :wide-toggle :title "Wert inklusive" :initial-value nil ) (label :value-type :boolean :toggle-type :wide-toggle :title "Beschriften" :initial-value t ) (keep :value-type :boolean :toggle-type :wide-toggle :title "Beschriftung behalten" :initial-value nil ) (next :title "Suchen" :toggle-type :wide-toggle :push-action (sd-call-cmds (next-action)) ) ) :local-functions '((next-action () (when (and back-state (not keep)) (progn (sd-return-to-model-checkpoint back-state) (setf back-state nil) );;progn );;when (if (and bgr genau) (progn (setf back-state (sd-set-model-checkpoint)) (dc4-suche-genauigkeit-in-bgr bgr genau label incl) );;progn (sd-display-error "Es wurden nicht alle erforderlichen Eingaben gemacht!") );;if ) ) :cleanup-action '(when (and back-state (not keep)) (sd-return-to-model-checkpoint back-state)) :ok-action '() :help-action '() ) ;; durchsucht alle Teile nach der Genauigkeit (genau) und gibt eine ;; entsprechende Liste mit allen Teilen mit geringerer Genauigkeit aus ;; (defun dc4-suche-genauigkeit-in-bgr (teil_bgr genau label incl) (let (teiletyp kind kinder teilgenau txt) (setf teiletyp (sel_item-type teil_bgr)) (if (equal teiletyp *sd-part-seltype*) (progn (when (not (sd-inq-empty-part-p teil_bgr)) (progn (setf teilgenau (sd-inq-part-geo-resolution teil_bgr)) (if (or (< genau teilgenau) (and incl (<= genau teilgenau))) (progn (if (sd-inq-obj-contents-read-only-p teil_bgr) (display (format nil "Genauigkeit ~,,,,,,'EG: ~a (schreibgeschuetzt)" teilgenau (sd-inq-obj-pathname teil_bgr))) (display (format nil "Genauigkeit ~,,,,,,'EG: ~a" teilgenau (sd-inq-obj-pathname teil_bgr))) );;if (if label (progn (setf txt (format nil "Genauigkeit ~,,,,,,'EG" teilgenau)) (when (not (sd-inq-obj-contents-read-only-p teil_bgr)) (cocreate_3d_note :action :create :note txt :items teil_bgr) );;when );;progn nil );;if );;progn nil );;if );;progn );;when );;progn ;; else (when (equal teiletyp *sd-assembly-seltype*) (progn (setf kinder (sd-inq-obj-children teil_bgr)) (dolist (kind kinder) (dc4-suche-genauigkeit-in-bgr kind genau label incl) ) ;; dolist ) ;; progn ) ;; when ) ;; if ) ;; let )