#|=================================================================================================== SW-Ansichten-Verwalten.lsp 2016-08-09 SW: erstellt von Wolfgang Seel als Vorlage diente anslist.lsp in der Version 1.0 vom 2003-09-01 Copyright 2003 DC4 Technisches Büro GmbH Author : Gt 2016-08-17 SW: erstellt von Wolfgang Seel Format umgebaut, speichert nun auch Bildschirmeinstellungen erzeugte Datei ist ein Standard-LISP und kann auch ohne Makro als LISP geladen werden. --------------------------------------------------------------------------* ä=Ì Ä=Ø ö=Î Ö=Ú ü=Ï Ü=Û ß=Þ °=³ ø=Ö Ø=Ò --------------------------------------------------------------------------* |# (in-package :SW) (use-package :OLI) (sd-defdialog 'SW-Ansichten-Verwalten :dialog-title "SW-Ansichten-Verwalten" :toolbox-button nil ; t ;;:dialog-control :sequential :variables '( ("Aktion wÌhlen, ....") (Laden :value-type :boolean :toggle-type :wide-toggle :title (sd-multi-lang-string "Load View" :german "Ansicht laden") :after-input (if Laden (progn (sd-set-variable-status 'datei :visible t) (sd-set-variable-status 'datei2 :visible nil) );;progn );;if :initial-value nil ) ; laden (Speichern :value-type :boolean :toggle-type :wide-toggle :title (sd-multi-lang-string "Save View" :german "Ansicht speichern") :after-input (if Speichern (progn (sd-set-variable-status 'datei :visible nil) (sd-set-variable-status 'datei2 :visible t) );;progn );;if :initial-value nil ) ; speichern (datei :value-type :filename :title "Datei" ;; :initialdirectory "T:/" ; alternativ anderes Laufwerk oder auch(sd-get-current-working-directory) ; :initialdirectory (sd-get-current-working-directory) :direction :input :initialpattern "*.view" :prompt-text "Dateiname der zu ladenden Ansichtsliste angeben" :size :third :before-input (progn ); progn :after-input (progn (sd-call-cmds (SW-lade-Ansichtsliste (first datei))) (sd-set-variable-status 'datei :visible nil) (setf Laden nil) (setf datei nil) ;(sd-call-cmds (fit_vp "1" update_screen)) ); progn :initial-visible nil ) (datei2 :value-type :filename :title "Datei" ;; :initialdirectory "T:/" ; alternativ anderes Laufwerk oder auch(sd-get-current-working-directory) ; :initialdirectory (sd-get-current-working-directory) :direction :output :initialpattern "*.view" :prompt-text "Dateiname der zu speichernden Ansichtsliste angeben" :if-exists :confirm-overwrite :size :third :before-input (progn ); progn :after-input (progn (sd-call-cmds (SW-speichere-Ansichtsliste (first datei2))) (sd-set-variable-status 'datei2 :visible nil) (setf Speichern nil) (setf datei2 nil) ); progn :initial-visible nil ) ("Struktur-Baum-Umkehrung") (Struktur-Baum-Umkehrung :title "Struktur-Baum-Umkehrung" :toggle-type :wide-toggle :initial-enable t :push-action (progn (sd-call-cmds (invert-action)) ) ;progn );end Struktur-Baum-Umkehrung ("Standard-Einstellungen") (Standard-Einstellungen :title "Standard-Einstellungen" :toggle-type :wide-toggle :initial-enable t :push-action (progn (uic_set_show_mode :3dgeo :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_edged :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_face_color :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_face_reflectance :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_face_transparency :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_edge_color :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_hidden :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_hidden_dimmed :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_label :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_mixed :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_part_reflectance :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_part_transparency :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_shaded :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_vertices :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :3dgeo_wire :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :clip_planes :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :coord_system :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :docu_planes :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :feature_pts :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :workplane_sets_match_lines :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :workplanes :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :workplanes_border :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :workplanes_hidden :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :workplanes_label :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :workplanes_local_axis :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :workplanes_2dgeo :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :workplanes_2dconstruction :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :workplanes_2dgeo_label :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :workplanes_2dgeo_vertices :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :layouts :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :layout_view_border :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :layout_view_label :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :CLIP_LINES :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :WORKPLANES_DIM_INACTIVE :OFF (oli::sd-inq-current-vp)) (uic_set_show_mode :WORKPLANES_2DGEO_LINE_TYPE :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :WORKPLANES_2DGEO_COLOR :ON (oli::sd-inq-current-vp)) (uic_set_show_mode :CLIP_HATCHES :ON (oli::sd-inq-current-vp)) ) ;progn );end Struktur-Baum-Umkehrung ) ; variables :local-functions '( (invert-action () (let (sichtblist sichtb) (setf sichtblist (sd-inq-vp-drawlist-objects (oli::sd-inq-current-vp))) (uic_draw_all (oli::sd-inq-current-vp)) (dolist (sichtb sichtblist) (sd-call-cmds (remove_from_vp_drawlist (oli::sd-inq-current-vp) :with-wp sichtb)) );;dolist );;let ) ;; invert-action ) ;; local-functions :ok-action '() :cancel-action '() :help-action '(sd-display-message " SW-Ansichten-Verwalten.lsp erstellt von Wolfgang Seel am 09.08.2016 Ziel des LISP-Makros ist es verschiedene Ansichten abzuspeichern und wieder herstellen zu kÎnnen. Die View-Dateien koennen auch als Standard-LISP geladen werden. besondere Vorraussetzungen: keine " :title "SW-Ansichten-Verwalten.lsp" :push "Weiter") ) ;;--------------------------------------------------------------------------* ;; Funktion: SW-speichere-Ansichtsliste * ;; laedt drawlist aus file * ;;-------------------------------------------------------------------------*/ (defun SW-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))) (format strm "; SW-Ansichten-Verwalten.lsp (c) Wolfgang Seel 2016-08-17~%~%" ) (format strm "; Konfigurationen speichern~%" ) (if (equal (oli::sd-inq-active-configuration) nil) (progn (format strm "; keine aktive Konfiguration gefunden.~%~%" ) (format strm "(if (equal (oli::sd-inq-active-configuration) nil)~%" ) (format strm "(progn ); progn~%" ) (format strm "(oli::CFN_ACTIVATE_CONFIGURATION :DEACTIVATE) ;; Konfigurationen deaktivieren ~%" ) (format strm ") ; endif~%~%" ) );progn (progn (setq configuration-name (format nil "\"~a\/~a\"" (oli::sd-inq-obj-pathname (oli::sd-inq-active-configuration)) ;; Pfadname-SEL-ITEM (oli::sd-inq-elem-name (oli::sd-inq-active-configuration)) ;; Name für SEL-ITEM wird ausgegeben )) (format strm "; aktive Konfiguration gefunden.~%~%" ) (format strm "(oli::cfn_activate_configuration :config :full_name ~a)~%~%" configuration-name ) ) ; progn ) ; endif (format strm "; Ansichtseinstellungen~%~%" ) (format strm "(uic_set_show_mode :3dgeo :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo)) ) (format strm "(uic_set_show_mode :3dgeo_edged :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_edged)) ) (format strm "(uic_set_show_mode :3dgeo_face_color :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_face_color)) ) (format strm "(uic_set_show_mode :3dgeo_face_reflectance :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_face_reflectance)) ) (format strm "(uic_set_show_mode :3dgeo_face_transparency :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_face_transparency)) ) (format strm "(uic_set_show_mode :3dgeo_edge_color :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_edge_color)) ) (format strm "(uic_set_show_mode :3dgeo_hidden :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_hidden)) ) (format strm "(uic_set_show_mode :3dgeo_hidden_dimmed :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_hidden_dimmed)) ) (format strm "(uic_set_show_mode :3dgeo_label :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_label)) ) (format strm "(uic_set_show_mode :3dgeo_mixed :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_mixed)) ) (format strm "(uic_set_show_mode :3dgeo_part_reflectance :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_part_reflectance)) ) (format strm "(uic_set_show_mode :3dgeo_part_transparency :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_part_transparency)) ) (format strm "(uic_set_show_mode :3dgeo_shaded :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_shaded)) ) (format strm "(uic_set_show_mode :3dgeo_vertices :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_vertices)) ) (format strm "(uic_set_show_mode :3dgeo_wire :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :3dgeo_wire)) ) (format strm "(uic_set_show_mode :clip_planes :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :clip_planes)) ) (format strm "(uic_set_show_mode :coord_system :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :coord_system)) ) (format strm "(uic_set_show_mode :docu_planes :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :docu_planes)) ) (format strm "(uic_set_show_mode :feature_pts :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :feature_pts)) ) (format strm "(uic_set_show_mode :workplane_sets_match_lines :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplane_sets_match_lines)) ) (format strm "(uic_set_show_mode :workplanes :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplanes)) ) (format strm "(uic_set_show_mode :workplanes_border :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplanes_border)) ) (format strm "(uic_set_show_mode :workplanes_hidden :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplanes_hidden)) ) (format strm "(uic_set_show_mode :workplanes_label :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplanes_label)) ) (format strm "(uic_set_show_mode :workplanes_local_axis :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplanes_local_axis)) ) (format strm "(uic_set_show_mode :workplanes_2dgeo :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplanes_2dgeo)) ) (format strm "(uic_set_show_mode :workplanes_2dconstruction :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplanes_2dconstruction)) ) (format strm "(uic_set_show_mode :workplanes_2dgeo_label :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplanes_2dgeo_label)) ) (format strm "(uic_set_show_mode :workplanes_2dgeo_vertices :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :workplanes_2dgeo_vertices)) ) (format strm "(uic_set_show_mode :layouts :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :layouts)) ) (format strm "(uic_set_show_mode :layout_view_border :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :layout_view_border)) ) (format strm "(uic_set_show_mode :layout_view_label :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :layout_view_label)) ) (format strm "(uic_set_show_mode :CLIP_LINES :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :CLIP_LINES)) ) (format strm "(uic_set_show_mode :WORKPLANES_DIM_INACTIVE :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :WORKPLANES_DIM_INACTIVE)) ) (format strm "(uic_set_show_mode :WORKPLANES_2DGEO_LINE_TYPE :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :WORKPLANES_2DGEO_LINE_TYPE)) ) (format strm "(uic_set_show_mode :WORKPLANES_2DGEO_COLOR :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :WORKPLANES_2DGEO_COLOR)) ) (format strm "(uic_set_show_mode :CLIP_HATCHES :~a (oli::sd-inq-current-vp))~%" (oli::getres (GET_SHOW (oli::sd-inq-current-vp) :CLIP_HATCHES)) ) (format strm "~%") ;; Leerzeile (format strm "~%") ;; Leerzeile (format strm "; Fensterzoom + Winkel-Einstellungen~%~%" ) (format strm "(oli::sd-set-vp-camera (oli::sd-inq-current-vp) " ) (with-standard-io-syntax (print (sd-inq-vp-camera (sd-inq-current-vp)) strm)) (format strm "~%:smooth t)~%" ) (format strm "~%") ;; Leerzeile (format strm "~%") ;; Leerzeile (format strm "; gespeicherte-Strukturbaum-Auswahl~%~%" ) (dolist (sichtb sichtblist) (format strm "(add_to_vp_drawlist (oli::sd-inq-current-vp) :with-wp (oli::sd-pathname-to-obj \"~a\" ))~%" (sd-inq-obj-pathname sichtb)) );;dolist (format strm "~%~%" ) (format strm "; Clipping Schnittebenen speichern~%" ) (if (equal (ELAN::CLIPPING-GET-ACTIVE-CLIPPING-FEATURE (oli:sd-inq-current-vp)) nil) (progn (format strm "; keine aktive Schnittebene gefunden.~%~%" ) (format strm "(if (equal (ELAN::CLIPPING-GET-ACTIVE-CLIPPING-FEATURE (oli:sd-inq-current-vp)) nil)~%" ) (format strm "(progn ); progn~%" ) (format strm "(oli::clipping_deactivate (oli::sd-inq-current-vp)) ;; Schnittebene deaktivieren ~%" ) (format strm ") ; endif~%~%" ) );progn (progn (setq clipping-name (format nil "\"~a\/~a\"" (oli::sd-inq-obj-pathname (ELAN::CLIPPING-GET-ACTIVE-CLIPPING-FEATURE (oli:sd-inq-current-vp))) ;; Pfadname-SEL-ITEM (oli::sd-inq-elem-name (ELAN::CLIPPING-GET-ACTIVE-CLIPPING-FEATURE (oli:sd-inq-current-vp))) ;; Name für SEL-ITEM wird ausgegeben )) (format strm "; aktive Schnittebene gefunden.~%~%" ) (format strm "(oli::clipping_activate (oli::sd-inq-current-vp) :full_name ~a)~%~%" clipping-name ) ) ; progn ) ; endif (close strm) );;let ) ;;-------------------------------------------------------------------------* ;; Funktion: SW-lade-Ansichtsliste * ;; Lädt Ansichtsliste mit Einstellungen * ;;-------------------------------------------------------------------------*/ (defun SW-lade-Ansichtsliste (datei) (sd-call-cmds (clear_vp (oli::sd-inq-current-vp))) (load datei) )