The following constants identify standard Creo Elements/Direct Modeling events which are available for use. These constants can be used as parameters for the event functions.
(sd-unsubscribe-event doc3d::*DOC3D-PRE-SHOW-DOCUPLANE-EVENT* 'change-viewport-name) (defun change-viewport-name (&rest arg-list) (let ((viewport-name (getf arg-list :viewport)) (docuplane (getf arg-list :docuplane)) (section (getf arg-list :section)) (scale (getf arg-list :scale)) ) (sd-vp-add-title-postfix viewport-name (format nil "SHOW of Docuplane '~A'~A~A." (sd-inq-docuplane-props docuplane :values :name) (if (= scale 1.0) "" (format nil " (Scale ~A)" scale) ) (if section " (sectioned)" "" ) ) ) ) ) (sd-subscribe-event doc3d::*DOC3D-PRE-SHOW-DOCUPLANE-EVENT* 'change-viewport-name) ;; ------------------------------------------------------------------------- (sd-unsubscribe-event doc3d::*DOC3D-END-SHOW-DOCUPLANE-EVENT* 'reset-viewport-name) (defun reset-viewport-name (&rest arg-list) (let ((viewport-name (getf arg-list :viewport))) (sd-vp-remove-title-postfix viewport-name) ) ) (sd-subscribe-event doc3d::*DOC3D-END-SHOW-DOCUPLANE-EVENT* 'reset-viewport-name) ;; ------------------------------------------------------------------------- (sd-unsubscribe-event doc3d::*DOC3D-POST-SHOW-DOCUPLANE-EVENT* 'show-docuplane-info) (defun show-docuplane-info (&rest arg-list) (let ((viewport-name (getf arg-list :viewport)) (docuplane (getf arg-list :docuplane)) (section (getf arg-list :section)) (scale (getf arg-list :scale)) (origin (getf arg-list :origin)) ) (display "Additional information:") (display (format nil "Docuplane: '~A'" (sd-inq-docuplane-props docuplane :values :name))) (display (format nil "Section: ~A" (if section "Yes" "No"))) (display (format nil "Origin: ~A" origin)) (display (format nil "Scale: ~A" scale)) ) ) (sd-subscribe-event doc3d::*DOC3D-POST-SHOW-DOCUPLANE-EVENT* 'show-docuplane-info)
© 2024 Parametric
Technology GmbH (a subsidiary of PTC Inc.), All Rights Reserved |