; ---------------------------------------------------------------------------------------- ; Annotation View without any model ; Copyright by der_Wolfgang@forum@Cad.de xx.08.2007 ; ---------------------------------------------------------------------------------------- #| recorded sequence as base of the following dialog create_part complete preselect cancel_all (progn (oli:sd-switch-application "Annotation" :delayedUpdate t) (values)) preselect AM_CREATE_STANDARD_VIEWS :owner :owner "/p2" :view_scale "1:2" :gen_view_direction :gen_view_direction :result_dir '(-0.0,-0.0,-1.0 0.0,0.0,0.0 0.0,1.0,0.0) ( docu::DOCU-PROCESS-DIRECT-PICK -178.372720013882 112.152596336891 :mouse-down) (gpntdocu -178.372720013882 112.15259633689099 "Annotation") :use_profile :on :use_profile :off complete preselect AM_VIEW_UPDATE :UPDATE_SELECTED_VIEWS ( docu::DOCU-PROCESS-DIRECT-PICK -160.281840535055 115.345104480213 :mouse-down) (gpntdocu -160.28184053505501 115.345104480213 "Annotation") ( docu::DOCU-PROCESS-BUTTON-2-3 'Button2 ) complete preselect (docu-enable-migration-tools) AM_DETACH_VIEW :view_2d "/p2/p1.1/gen1" :YES ( docu::DOCU-PROCESS-BUTTON-2-3 'Button2 ) complete preselect |# (in-package :my-tools) (use-package :oli) (sd-defdialog 'am_pseudo_view :toolbox-button NIL :variables '( (curr-part :initial-value (sd-inq-curr-part)) (scale :value-type :positive-number :initial-value (sd-am-inq-drawing-scale) :proposals '(0.1 0.2 0.5 1 2 5 10) ) (view_name :value-type :string :initial-value "General" ) (view_position :value-type :docupoint :initial-optional t ) ) :ok-action '(let (new-part new-view) ;; (trace AM_CREATE_STANDARD_VIEWS AM_DETACH_VIEW AM_VIEW_PROP delete_3d current_part) (sd-call-cmds (create_part)) (setq new-part (sd-inq-curr-part)) (if view_position (sd-call-cmds (AM_CREATE_STANDARD_VIEWS :owner new-part :view_scale scale :gen_view_direction :result_dir '(-0.0,-0.0,-1.0 0.0,0.0,0.0 0.0,1.0,0.0) :view_position view_position :use_profile :on ;; implies the view update )) (sd-call-cmds (AM_CREATE_STANDARD_VIEWS :owner new-part :view_scale scale :gen_view_direction :result_dir '(-0.0,-0.0,-1.0 0.0,0.0,0.0 0.0,1.0,0.0) :use_profile :on ;; implies the view update )) ) (setq new-view (car (sd-inq-obj-children (SD-AM-INQ-CURR-VIEW-SET)))) ;; (sd-call-cmds (AM_VIEW_UPDATE :UPDATE_SELECTED_VIEWS ....)) (sd-call-cmds (AM_VIEW_PROP :the_view (sd-inq-obj-pathname new-view) :NAME view_name)) (sd-call-cmds (AM_DETACH_VIEW :view_2d (sd-inq-obj-pathname new-view) :YES)) ;; remove tmp part (sd-call-cmds (delete_3d new-part)) ) ;; end ok-action :cleanup-action '(when curr-part (current_part curr-part)) ) ;; end dialog ;; gimmick: (when (sd-windows-p) (defvar *add-AM_VIEW_PSEUDO-button-once* (sd-add-menu-button "AM_VIEW_PSEUDO" :label (sd-multi-lang-string "Pseudo View" :german "LuftAnsicht") :parent (list "AM-MAIN-VIEWS" "CREATE_VIEWS") :image "Annotation/View/create_standard" :pushAction "am_pseudo_view" ) ))