Extended modules > Advanced Machining > Machining customization > Supplying additional tables - example 5
  
Supplying additional tables - example 5
This is an example file showing the possibility to customize the Counterbore Hole dialog box of Creo Elements/Direct Machining Advisor by using the Creo Elements/Direct Modeling Integration Kit. This example is maintained according to the actual status of Creo Elements/Direct Machining Advisor. The file is not guaranteed to work with future releases of Creo Elements/Direct Machining Advisor without the changes that are required in absolutely necessary cases.
No guarantee is implied that the values conform to the standard.
In customization tables you must use unique entries for the key column. If you use similar multiple entries for the key column, the first matching entry for the key column in the table is selected.
In the following example, Hole Diameter is the key column. The same hole diameter, that is 9.0, appears more than once in the table for different Counterbore descriptions. If you choose the K m 8 Counterbore in the customized table of the Counterbore Hole dialog box, the details of the H m 8 Counterbore are selected, as H m 8 is the first entry in the table with the hole diameter 9.0. This restriction can be circumvented by some simple changes to the supplied customizing tables. Supplying additional tables - example 6 demonstrates how the above situation can be resolved.
|#
;;
;;---- 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 table names or function names
;; mentioned below, please refer to the Data table customization
;;
;;---- Now creating a new table to support the Creation of Counterbored
;; Holes similar to those specified by DIN74 T1-T3
;; ;; The colums contain the following data :
;; 1. Column Name : Description
;; Key : :description
;; Type : string
;; Unit : nil
;; 2. Column Name : Hole Diameter
;; Key : :hole_dia
;; Type : :length
;; Unit : :mm
;; 3. Column Name : Hole Diameter Tolerance
;; Key : :hole_dia_tol
;; Type : :list
;; Unit : nil
;; 4. Column Name : Counterbore Diameter Properties
;; Key : :sink_dia_prop
;; Type : :length
;; Unit : :mm
;; 5. Column Name : Counterbore Depth Properties
;; Key : :sink_depth_prop
;; Type : :list
;; Unit : nil
;;
(sd-create-logical-table "mach_adv_library-counterbored_throughhole-hole_dia-table"
:columns '(:description :hole_dia :hole_dia_tol :sink_dia_prop :sink_depth_prop)
:columnNames '( "Description"
"Hole Diameter"
"Hole Diameter Tolerance"
"Sink Diameter"
"Sink Depth"

) :types '(:string :length :list :list :list)
:units '(nil :mm nil nil nil)
:contents '(
(
"H m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 15 :tol_type :iso :iso "H13")
(:value 6 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"H f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 15 :tol_type :iso :iso "H12")
(:value 6 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"J m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 15 :tol_type :iso :iso "H13")
(:value 6 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"J f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 15 :tol_type :iso :iso "H12")
(:value 6 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"K m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 15 :tol_type :iso :iso "H13")
(:value 9 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"K f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 15 :tol_type :iso :iso "H12")
(:value 9 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"H1 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 18 :tol_type :iso :iso "H13")
(:value 8 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"H1 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 18 :tol_type :iso :iso "H12")
(:value 8 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"J1 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 18 :tol_type :iso :iso "H13")
(:value 8 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"J1 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 18 :tol_type :iso :iso "H12")
(:value 8 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"K1 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 18 :tol_type :iso :iso "H13")
(:value 11 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"K1 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 18 :tol_type :iso :iso "H12")
(:value 11 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"H2 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 20 :tol_type :iso :iso "H13")
(:value 8 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"H2 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 20 :tol_type :iso :iso "H12")
(:value 8 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"J2 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 20 :tol_type :iso :iso "H13")
(:value 8 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"J2 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 20 :tol_type :iso :iso "H12")
(:value 8 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"K2 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 20 :tol_type :iso :iso "H13")
(:value 11 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"K2 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 20 :tol_type :iso :iso "H12")
(:value 11 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SA m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 24 :tol_type :iso :iso "H13")
(:value 6.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SA f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 24 :tol_type :iso :iso "H12")
(:value 6.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TA m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 24 :tol_type :iso :iso "H13")
(:value 7.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TA f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 24 :tol_type :iso :iso "H12")
(:value 7.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SB m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 26 :tol_type :iso :iso "H13")
(:value 6.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SB f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 26 :tol_type :iso :iso "H12")
(:value 6.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TB m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 26 :tol_type :iso :iso "H13")
(:value 7.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TB f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 26 :tol_type :iso :iso "H12")
(:value 7.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SA1 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 24 :tol_type :iso :iso "H13")
(:value 8.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SA1 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 24 :tol_type :iso :iso "H12")
(:value 8.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TA1 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 24 :tol_type :iso :iso "H13")
(:value 9.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TA1 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 24 :tol_type :iso :iso "H12")
(:value 9.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SB1 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 26 :tol_type :iso :iso "H13")
(:value 8.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SB1 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 26 :tol_type :iso :iso "H12")
(:value 8.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TB1 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 26 :tol_type :iso :iso "H13")
(:value 9.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TB1 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 26 :tol_type :iso :iso "H12")
(:value 9.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SA2 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 24 :tol_type :iso :iso "H13")
(:value 8.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SA2 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 24 :tol_type :iso :iso "H12")
(:value 8.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TA2 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 24 :tol_type :iso :iso "H13")
(:value 9.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TA2 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 24 :tol_type :iso :iso "H12")
(:value 9.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SB2 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 26 :tol_type :iso :iso "H13")
(:value 8.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"SB2 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 26 :tol_type :iso :iso "H12")
(:value 8.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TB2 m 8"
9.0
(:tol_type :iso :iso "H13")
(:value 26 :tol_type :iso :iso "H13")
(:value 9.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
(
"TB2 f 8"
8.4
(:tol_type :iso :iso "H12")
(:value 26 :tol_type :iso :iso "H12")
(:value 9.5 :tol_type :upper_lower :lower_tol 0.0 :upper_tol 0.4)
)
)
)
;;---- There must be a display table for each logical table,
;;---- else the table cannot be used at all.
;;
(sd-create-display-table "mach_adv_library-counterbored_throughhole-hole_dia-table"
:tableTitle "Counterbores"
:logicalTable "mach_adv_library-counterbored_throughhole-hole_dia-table"
:columns '(:description :hole_dia)
:filterStatusLine nil :applyColumns '(:hole_dia)
:selectionMode :single-row
:applyAction :default-tokens);;
;;