#| Wenn man Exemplare ausblendet wird auf die ganze Baugruppe gezoomt, bei einer großen BG muß man dann immer wieder reinsuchen. Kannst du das "zoomen" beim Exemplare ausblenden deaktivieren. Dazu brauchst du nur die beiden Zeilen unter Kommentar ";;" setzen: ;;(uic_set_vp_direction -1.0,3.0,-1.0 (oli::sd-inq-current-vp)) ;;(fit_vp (oli::sd-inq-current-vp)) Die erste dreht dir die Objekte, die zweite zoomt sie dir auf den gesamten Bildschirm |# (in-package :examples) (use-package :oli) (sd-defdialog 'sd-exemplaranzeige :dialog-title "Exemplaranzeige" :toolbox-button t :after-initialization '(progn (sd-set-variable-status 'Exemplare_anz :enable nil) (sd-set-variable-status 'Exemplare_aus :enable nil) ) :variables '(("Besitzerangabe") (Besitzer :value-type :assembly :title "Baugr.:" :prompt-text "Besitzer-Baugruppe angeben." :initial-value nil :modifies nil :size :third :after-input (progn (setf Teil nil) (setf Baugruppe nil) (setf Anzahl nil) (sd-set-variable-status 'Exemplare_anz :enable nil) (sd-set-variable-status 'Exemplare_aus :enable nil) (setf Rootbesitzer nil) ) ) (Rootbesitzer :value-type :boolean :title "Alles auswÌhlen" :toggle-type :wide-toggle :after-input (progn (setf Besitzer "/") ) ) ("Exemplarangabe") (Teil ;;:value-type :part :selection (*sd-part-seltype*) :face-part-allowed t :show-select-menu nil :multiple-items nil :title "Teil:" :prompt-text "Teil angeben." :initial-value nil :after-input (progn (setf Auswahl "Teil") (exemplare-anzahl Teil Besitzer) (if (> Anzahl_nummer 1) (progn (sd-set-variable-status 'Exemplare_anz :enable t) (sd-set-variable-status 'Exemplare_aus :enable t) ) (progn (sd-set-variable-status 'Exemplare_anz :enable nil) (sd-set-variable-status 'Exemplare_aus :enable nil) ) ) ) ) (Baugruppe ;;:value-type :assembly :selection (*sd-assembly-seltype*) :face-part-allowed t :show-select-menu nil :multiple-items nil :title "Baugr.:" :prompt-text "Baugruppe angeben." :initial-value nil :after-input (progn (setf Auswahl "Baugruppe") (exemplare-anzahl Baugruppe Besitzer) (if (> Anzahl_nummer 1) (progn (sd-set-variable-status 'Exemplare_anz :enable t) (sd-set-variable-status 'Exemplare_aus :enable t) ) (progn (sd-set-variable-status 'Exemplare_anz :enable nil) (sd-set-variable-status 'Exemplare_aus :enable nil) ) ) ) ) ("-") ("Abfrage - Ergebnis:") (Anzahl :value-type :display-only :title "Gesamt-Anz.:" :value-visibility-alignment :left ) ("Ansichts-Optionen") (Exemplare_anz :title "Exemplare anzeigen" :toggle-type :wide-toggle :push-action (progn (when (equal Auswahl "Teil") (exemplare-anzeigen Teil Besitzer) ) (when (equal Auswahl "Baugruppe") (exemplare-anzeigen Baugruppe Besitzer) ) ) ) (Exemplare_aus :title "Exemplare ausblenden" :toggle-type :wide-toggle :push-action (progn (when (equal Auswahl "Teil") (exemplare-ausblenden Teil Besitzer) ) (when (equal Auswahl "Baugruppe") (exemplare-ausblenden Baugruppe Besitzer) ) ) ) ("-") (Gesamtanzeige :title "Alle Objekte anzeigen" :toggle-type :wide-toggle :push-action (progn (sd-call-cmds (uic_draw_all (oli::sd-inq-current-vp)) ) (uic_set_vp_direction -1.0,3.0,-1.0 (oli::sd-inq-current-vp)) (fit_vp (oli::sd-inq-current-vp)) ;;(update_screen) ) ) ) :mutual-exclusion '(Teil Baugruppe) :local-functions '((exemplare-anzahl (Exemplar Besitzer) (progn (let (System-id-name Alle_elemente Element) (setf System-id-name (sd-inq-obj-contents-sysid Exemplar)) (setf Alle_elemente (sd-call-cmds (get_selection :focus_type (list *sd-part-seltype* *sd-assembly-seltype*) :check_function #'(lambda (pseudo) ;;(display (sd-inq-obj-contents-sysid pseudo)) (if (string= System-id-name (sd-inq-obj-contents-sysid pseudo)) :ok :filter ) ) :select :recursive :in_assembly Besitzer ) :failure (display "=> Fehler beim Ermitteln der Exemplare") ) ) (setf Anzahl_nummer (list-length Alle_elemente)) (setf Anzahl (format nil "~a StÏck" Anzahl_nummer)) ) ) ) (exemplare-anzeigen (Exemplar Besitzer) (progn (let (System-id-name Alle_elemente Element) (setf System-id-name (sd-inq-obj-contents-sysid Exemplar)) (setf Alle_elemente (sd-call-cmds (get_selection :focus_type (list *sd-part-seltype* *sd-assembly-seltype*) :check_function #'(lambda (pseudo) (if (string= System-id-name (sd-inq-obj-contents-sysid pseudo)) :ok :filter ) ) :select :recursive :in_assembly Besitzer ) :failure (display "=> Fehler beim Ermitteln der Exemplare.") ) ) (sd-call-cmds (create_vp :corner_1 (make-gpnt2d :x 188 :y 0) :corner_2 (make-gpnt2d :x 842 :y 496) ) ) (uic_set_vp_direction -1.0,3.0,-1.0 (oli::sd-inq-current-vp)) (dolist (Element Alle_elemente) (sd-call-cmds (add_to_vp_drawlist (oli::sd-inq-current-vp) Element) :failure (progn (display "=> Kann Exemplare nicht anzeigen.") ) ) (fit_vp (oli::sd-inq-current-vp)) ) ;;(update_screen) ) ) ) (exemplare-ausblenden (Exemplar Besitzer) (progn (let (System-id-name Alle_elemente Element) (setf System-id-name (sd-inq-obj-contents-sysid Exemplar)) (setf Alle_elemente (sd-call-cmds (get_selection :focus_type (list *sd-part-seltype* *sd-assembly-seltype*) :check_function #'(lambda (pseudo) (if (string= System-id-name (sd-inq-obj-contents-sysid pseudo)) :ok :filter ) ) :select :recursive :in_assembly Besitzer ) :failure (display "=> Fehler beim Ermitteln der Exemplare.") ) ) (dolist (Element Alle_elemente) (sd-call-cmds (remove_from_vp_drawlist (oli::sd-inq-current-vp) Element) :failure (progn (display "=> Kann Exemplare nicht ausblenden.") ) ) (fit_vp (oli::sd-inq-current-vp)) ) ;;(update_screen) ) ) ) ) :ok-action '() :cancel-action '() )