Extended modules > Advanced Machining > Machining customization > Multiple value combinations for threaded holes
  
Multiple value combinations for threaded holes
This is an example file showing the possibility to customize the tapped hole dialog boxes in the 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.
|#
;;
;;---- 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 changing (i.e. replacing) contents of the tap-table of Machining Advisor
;; Using the class name "TappedHoles" will cause Machining Advisor to use
;; this table for all Tapped Holes as long as there are no special tables for
;; individual tapped holes like "PartiallyThreadedThroughHoles"
;; Caveat: The names of the table has to be given in lowercase letters !
;;
;; The colums contain the following data :
;; 1. Column Name : Tap Units
;; Key : :tap_units
;; Type : string {
;; "inch" :inch
;; "metric" :metric
;; "BSF" :bsf
;; "BSW" :bsw
;; "BSP" :bsp
;; "UNC" :unc
;; "UNF" :unf
;; "NPT" :npt
;; "Rp" :pipe_rp
;; "G" :pipe_g
;; "JIS" :pipe_jis_b_0203
;; "PG" :pipe_pg
;; "MF" :metric_fine
;; "Trapezoid" :trapezoid
;; "FlatTrapezoid" :flat_tapezoid
;; "Saw" :saw
;; "Round" :round
;; "Round_Mining" :round_mining
;; "Edison" :edison
;; }
;; Unit : nil
;; 2. Column Name : Thread Dia Id
;; Key : :thread_dia_id instead;; of :tap since Creo Elements/Direct Modeling 17.00 within the thread_dia-table
;; Type : string
;; Unit : nil
;; 3. Column Name : Drill Rad (the radius of the pilot hole)
;; Key : :drill_rad
;; Type : :length
;; Unit : :mm
;; 4. Column Name : Tap Rad (radius of the nominal diameter of the thread)
;; Key : :tap_rad
;; Type : :length
;; Unit : :mm
;; 5. Column Name : Thread Size (the pitch or thread lead of the thread)
;; Key : :thread_size
;; Type : :length
;; Unit : :mm
;; 6. Column Name : Chamfer Rad (the outer radius of the chamfer)
;; Key : :drill_rad
;; Type : :length
;; Unit : :mm
;; 7. Column Name : Standard Tap Clearance (approximately 6 times thread pitch)
;; Key : :std_tap_clearance
;; Type : :length
;; Unit : :mm
;; 8. Column Name : Thread Starts
;; Key : :thread_starts
;; Type : :number
;; Unit : nil
;; 9. Column Name : Nominal Pipe Diameter
;; Key : :nominal_pipe_dia
;; Type : :length
;; Unit : :mm
;; 10. Column Name : Thread TPI (the pitch or thread lead of the thread given in threads-per-inch)
;; Key : :thread_tpi
;; Type : :number
;; Unit : nil
;; 11. Column Name : Thread TPI nominator
;; Key : :thread_tpi_num
;; Type : :number
;; Unit : nil
;; 12. Column Name : Thread TPI denominator
;; Key : :thread_tpi_den
;; Type : :number
;; Unit : nil
;;
;; for further information about the "sd-change-logical-table-contents" 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.
;;
;; This example adds the threads with diameter 20 - 64 to the table by adding one row at a
;; time. The result is the same table as within the first example. The content of the list
;; supplied as value for the key :content is the same as one line in the table of the first
;; example.
;; If you want to remove original lines you can use the corresponding function
;; 'sd-remove-logicial-table-row'
;;
;; A speciality of the tap-table is shown below as well. For compatibility
;; reasons with older versions of Machining Advisor, the tap table has to
;; be supplied twice with the same contents
;; table 1: "mach_adv_library-tappedholes-tap-table"
;; table 2: "mach_adv_library-tappedholes-thread_dia-table"
;; Up to %%ProductName%% 09.0x the "tap" table was the only one needed
;; later versions need the "thread_dia" table, which will be displayed
;; when pushing the thread_dia button and the "tap" table behind the scenes
;; to be able to process tapped holes from Rev 09.0x and to work properly
;; with the key-values sent to %%ProductName%% by the "thread_dia" table.
;;
;; With %%ProductName%% 17.00 the need to implement both the "tap" table and the "thread_dia" table and to keep those synchronized has been mostly eliminated. It is only needed, if you have other dialogs using the threaded holes which specify the thread via the :tap parameter. The column key :tap has been replaced by :thread_dia_id within the "thread_dia" table.
;;
;; This way is the method to use, if you want to add only some additional lines into the
;; tables supplied by Creo Elements/Direct or want to remove some of the values as they are not
;;---- used within your company.
;;
(sd-insert-logical-table-row "mach_adv_library-tappedholes-tap-table"
:position :below-specific
:overwriteIfExists nil
:units '(nil nil :mm :mm :mm :mm :mm nil :mm)
:plist '(:tap "16-2")
:contents '("metric" "16-2-power" 7.0 8.0 2.0 8.0 12.0 1 0.0))
(sd-insert-logical-table-row "mach_adv_library-tappedholes-thread_dia-table"
:position :below-specific
:overwriteIfExists nil
:units '(nil nil :mm :mm :mm :mm :mm nil :mm)
:plist '(:thread_dia_id "16-2")
:contents '("metric" "16-2-power" 7.0 8.0 2.0 8.0 12.0 1 0.0))

;;