拡張モジュール > 高度な穴加工 > 穴加工のカスタマイズ > パラメータのカスタマイズに関するアドバイス
  
パラメータのカスタマイズに関するアドバイス
これは、Creo Elements/Direct Modeling Integration Kit を使用して Creo Elements/Direct Machining Advisor の各種止り穴ダイアログボックスをカスタマイズする方法を示すサンプルファイルです。このファイルは、Creo Elements/Direct Machining Advisor の実際の状態に応じて変更して使用します。ファイルは、絶対的に必要な場合において要求される変更を除き、Creo Elements/Direct Machining Advisor の将来のリリースを使用した操作では保証されません。
保証しないということは、値が標準に準拠していることを暗黙的に示しています。
|#
;;
;;---- all customization of Dialogs belonging to Machining Advisor have to be
;;---- made within package ':cad-cam-link-customization'
;;
(in-package :cad-cam-link-customization)
;;
;;---- To use the Integration Kit functionality, you have to use the package 'oli'
;; which contains all the functions of the Integration Kit and stands for
;;---- Open-Lisp-Interface
;;
(use-package :oli)
;;
;;----
For more information about the function names
;; mentioned below, please refer to the データテーブルのカスタマイズ.
;;
;;----
;;---- When a hole dialog gets a diameter or depth value, it will check
;; those values against the model and against rules either built-in
;; to Machining Advisor or supplied by the user.
;;
;; In order to achieve this, there is a callback interface
;; provided, which allows material or site based reasoning.
;;
;;---- The function called by that callback interface has to have the
;;---- signature as follows, the function will deal with the class blind_hole
(defun check-mach_adv_library-blind_hole-parameter-fnc (&key
depth
diameter
feature-parameter
part
library
feature-long-name
feature-class-name
&aux
status
message
severity
)
;;
;;---- your code for checking the ratio depth to diameter you may do checks based
;; upon the part, its material etc. but it is not allowed that the function
;;---- gets interactive
;;---- for demonstation purposes I will supply code similar to the built-in code
(if (and diameter depth (> diameter 0.0) (> depth 0.0))
(cond ((> depth (* 200.0 diameter))
(setf
status :warning
message (format nil "*** Specified Depth ~A Exceeds 200 times Dia. ~A, you may not find any equipment capable of this machining operation ***"
(sd-num-to-string (sd-sys-to-user-units :length depth) 3)
(sd-num-to-string (sd-sys-to-user-units :length diameter) 3)
)
severity :high
)
)
((> depth (* 10.0 diameter))
(setf
status :warning
message (format nil "*** Specified Depth ~A Exceeds 10 times Dia. ~A, you may need special deep hole drilling equipment ***"
(sd-num-to-string (sd-sys-to-user-units :length depth) 3)
(sd-num-to-string (sd-sys-to-user-units :length diameter) 3)
)
severity :medium
)
)
((> depth (* 3.0 diameter))
(setf
status :warning
message (format nil "*** Specified Depth ~A Exceeds 3 times Dia. ~A, you may need to take special care while drilling ***"
(sd-num-to-string (sd-sys-to-user-units :length depth) 3)
(sd-num-to-string (sd-sys-to-user-units :length diameter) 3)
)
severity :low
)
)
(t (setf status :ok message "" severity :none)) ) ;; end cond
(setf status :ok message "" severity :none)
)
(values status message severity))
;;
;;---- this function will be called by Machining Advisor with
;;
;; :depth { longfloat }
;; :diameter { longfloat }
;; :part { SEL_ITEM }
;; :library { STRING [ "mach_adv_library" ]}
;; :feature-long-name { STRING }
;; :feature-class-name { STRING }
;; :feature-parameter { property-list or structure }
;;
;;---- and is expected to match the return value requirements for confimation with
;; warning dialog functions used within sd-defdialog
;;
;; The callback-interface expects the function to do a multiple-value return
;; i.e. use (values return-value advisor-message severity)
;; The following return values are allowed :
;; return-value { :ok | :error | :warning }
;; advisor-message { STRING }
;; severity { :none | :low | :medium | :high }
;;