Extended modules > Advanced Machining > Machining customization > Supplying additional tables - example 6
  
Supplying additional tables - example 6
This example file shows the possibility to customize the Counterbore Hole dialog box in the Machining Advisor by using the SolidDesigner Integration Kit. This example will be maintained according to the actual status of Machining Advisor but it is not guaranteed to work as is with future releases of Machining Advisor without changes although those will be required only in cases when absolutely necessary. Especially no guarantee is implied that the values conform to the standard. A restriction for the customization tables is explained in Supplying additional tables - example 5. In customization tables, you must use unique entries for the key column. If you use similar multiple entries for the key column, only the first matching entry in the table is selected. In the following example, you can find a solution to remove this restriction.
In addition to the value in the key column, you can create a unique string using the standard description for the feature. Similar to the subvariables like _tol and _prop for the toleranced length variables, you can use the _id subvariable. The following example demonstrates the use. The key column in the table is hole_diameter. You can specify a unique string for each entry using the former :description attribute, which is now : hole_diameter_id. Although the hole diameter 9.0 appears more than once in the table, hole_dia_id is unique. If you choose the K m 8 Counterbore in the customized table of the Counterbore Hole dialog box, the details of the K m 8 Counterbore are selected, as it is uniquely identified.
#

;;
;;---- 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 : :hole_dia_id (instead of :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
;;
;; for further information about the "sd-create-logical-table" please
;; refer to the documentation of the SolidDesigner Integration Kit
;;
;; As you can see within the example, the units of the columns can be redefined and have to be
;; specified therefore, but you can override the units for every entry by specifying a LISP list
;; containing a value and a units keyword.
;;----
;;

(sd-create-logical-table "mach_adv_library-counterbored_throughhole-hole_dia-table"
:columns '(:hole_dia_id :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 '(:hole_dia_id :hole_dia)
:filterStatusLine nil
:applyColumns '(:hole_dia_id)
:selectionMode :single-row
:applyAction :default-tokens
)

;; Note: This file is directly loadable into SolidDesigner.