################################################################################
#   This is the definition file for tools with an ASCII File as the database
#
#
#=======================================================================
#
DB_PREFIX  "DB("
DB_SUFFIX  ")"
ESS_PREFIX "ESS("
ESS_SUFFIX ")"


#############################################################################
#    The list of DB_ALIAS
#
#    All the <alias> defined here can be used in the class description at the end
#    of this file in order to define the fields that should appear in
#    the search criteria and search result dialogs within UG for every class.
#
#    DB_ALIAS  <alias>
#    {
#       DB_ID       < Attribute Identifier defined in the ASCII Data File >
#       DB_ID_TYPE  < Type of the identifier >
#           d _ double
#           i _ integer
#           s _ string
#           OPTIONS       "opt1" "opt2 " "opt3" 
#           OPTIONS_IDS   "val1"  "val2" "val3"
#           DIALOG_NAME "label in search criteria dialog"
#           RSET_NAME   "label in search result dialog"
#    }
#
#    OPTIONS and OPTIONS_IDS can be ommitted, If they are specified
#    then a corresponding option menu is created in the Search Criteria Dialog
#    instead of a simple search field.
#############################################################################

#    The DB_ALIAS of the library reference. It is mandatory that this DB_ALIAS
#    appears in the alias list
#    

        DB_ALIAS UGType
        {
            DB_ID        UGT
            DB_ID_TYPE   i
            DIALOG_NAME "UG Type"
            RSET_NAME   "UG Type"         
        }

        DB_ALIAS UGSubtype
        {
            DB_ID        UGST
            DB_ID_TYPE   i
            DIALOG_NAME "UG Subtype"
            RSET_NAME   "UG Subtype"         
        }

        DB_ALIAS  ToolNum
        {
            DB_ID     TLNUM
            DB_ID_TYPE   i
            DIALOG_NAME "Tool Number"
            RSET_NAME   "Tool Number"
        }
         
        DB_ALIAS  AdjReg
        {
            DB_ID     ADJREG
            DB_ID_TYPE   i
            DIALOG_NAME "Adjust Register"
            RSET_NAME   "Adjust Register"
        }
         
        DB_ALIAS  CutcomReg
        {
            DB_ID     CUTCOMREG
            DB_ID_TYPE   i
            DIALOG_NAME "Cutcom Register"
            RSET_NAME   "Cutcom Register"
        }

        DB_ALIAS  HolderAngle
        {
           DB_ID     HANGLE
           DB_ID_TYPE   d
           DIALOG_NAME "Holder Angle"
           RSET_NAME   "Holder Angle"
        }

        DB_ALIAS  ToolRigidity
        {
           DB_ID     RIGID
           DB_ID_TYPE   d
           DIALOG_NAME "Tool Rigidity"
           RSET_NAME   "Tool Rigidity"
        }

        DB_ALIAS  InsertLength1
        {
           DB_ID     IL
           DB_ID_TYPE   d
           DIALOG_NAME "(IL) Insert Length"
           RSET_NAME   "(IL) Insert Length"
        }

        DB_ALIAS  ToolTrackingPoint
        {
           DB_ID        TP
           DB_ID_TYPE   s
           DIALOG_NAME  "Tool Tracking Point"
           RSET_NAME    "Tool Tracking Point"
        }

        DB_ALIAS  InsertPosition
        {
           DB_ID     INSP
           DB_ID_TYPE   i
           DIALOG_NAME "Insert Position"
           RSET_NAME   "Insert Position"
        }

        DB_ALIAS  ThicknessType
        {
           DB_ID     THCT
           DB_ID_TYPE   s
           OPTIONS      "01" "T1" "02" "T2" "03" "T3" "04" "05" "06" "07" "09" "11" "12" "User"
           OPTIONS_IDS  "(01)" "(T1)" "(02)" "(T2)" "(03)" "(T3)" "(04)" "(05)" "(06)" "(07)" "(09)" "(11)" "(12)" "(13)"
           DIALOG_NAME "Thickness Type"
           RSET_NAME   "Thickness Type"
        }

        DB_ALIAS  ReliefAngle
        {
           DB_ID     RELA
           DB_ID_TYPE   d
           DIALOG_NAME "Relief Angle"
           RSET_NAME   "Relief Angle"
        }

        DB_ALIAS  ReliefAngleType
        {
           DB_ID     RELT
           DB_ID_TYPE   s
           OPTIONS      "A (3)" "B (5)" "C (7)" "D (15)" "E (20)" "F (25)" "G (30)" "N (0)" "P (11)" "O (other)"
           OPTIONS_IDS  "(A)" "(B)" "(C)" "(D)" "(E)" "(F)" "(G)" "(N)" "(P)" "(O)"
           DIALOG_NAME "Relief Angle Type"
           RSET_NAME   "Relief Angle Type"
        }
        
        DB_ALIAS  InsertType
        {
           DB_ID       IT
           DB_ID_TYPE   s
           OPTIONS      "A (Parallelogram 85)" "B (Parallelogram 82)" "C (Diamond 100)" "C (Diamond 80)" "D (Diamond 55)" "E (Diamond 75)" "H (Hexagon 120)" "K (Parallelogram 55)" "L (Rectangle)" "M (Diamond 86)" "O (Octagon 135)" "P (Pentagon 108)" "R(Round)" "S (Square)" "T (Triangle)" "V (Diamond 35)" "W (Trigon 80)" "X (User Defined)"
           OPTIONS_IDS  "A" "B" "c" "C" "D" "E" "H" "K" "L" "M" "O" "P" "R" "S" "T" "V" "W" "X" 
           DIALOG_NAME "Insert Type"
           RSET_NAME   "Insert Type"
        }

        DB_ALIAS  MaxToolDepth
        {
           DB_ID     MXDP
           DB_ID_TYPE   s
           DIALOG_NAME "Max Tool Depth"
           RSET_NAME   "Max Tool Depth"	
        }

        DB_ALIAS  MinBoringDia
        {
           DB_ID     MNBD
           DB_ID_TYPE   s
           DIALOG_NAME "Min Boring Diameter"
           RSET_NAME   "Min Boring Diameter"	
        }

        DB_ALIAS  MaxToolReach
        {
           DB_ID     MXTR 
           DB_ID_TYPE   s
           DIALOG_NAME "Max Tool Reach"
           RSET_NAME   "Max Tool Reach"	
        }

        DB_ALIAS  OrientAng
        {
           DB_ID     OA 
           DB_ID_TYPE   d
           DIALOG_NAME "(OA) Orient Angle"
           RSET_NAME   "(OA) Orient Angle"
        }

#################################################################


LIBREF     libref


#########################################################################
#                      The Class Hierarchy                              #
#########################################################################

CLASS TOOL
{
    TYPE QRY
    QUERY  "[DB(libref)] != [0]"
    DIALOG libref
    RSET   libref Descr MaterialDes 
    UI_NAME "Tool"
    CLASS TURNING
    {
        TYPE QRY
        QUERY  "[DB(Type)] == [01]"
        DIALOG libref Descr
        RSET   libref Descr Material MaterialDes
        UI_NAME "Turning"

        CLASS OD_TURNING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [01]"
            FILE "qry=outside_turn_schema;rset=outside_turn_schema;" 
            DIALOG libref NoseRadius InsertNoseAngle  CuttingEdgeLength Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes ToolNum AdjReg CutcomReg Holder HolderDes InsertType OrientAng InsertNoseAngle NoseRadius CuttingEdgeLength InscribedCircle Thickness ThicknessType ReliefAngle ReliefAngleType MaxToolDepth X_Offset Y_Offset ToolTrackingPoint InsertPosition MinBoringDia MaxToolReach XMount YMount HolderAngle ToolRigidity HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "OD Turning"
        } 
        CLASS ID_TURNING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [02]"
            FILE "qry=inside_turn_schema;rset=inside_turn_schema;" 
            DIALOG libref NoseRadius InsertNoseAngle  CuttingEdgeLength MinBoringDia MaxToolReach Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes ToolNum AdjReg CutcomReg Holder HolderDes InsertType OrientAng InsertNoseAngle NoseRadius CuttingEdgeLength InscribedCircle Thickness ThicknessType ReliefAngle ReliefAngleType MaxToolDepth X_Offset Y_Offset ToolTrackingPoint InsertPosition MinBoringDia MaxToolReach XMount YMount HolderAngle ToolRigidity HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "ID Turning"
        } 
        CLASS PRIME_TURNING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [03]"
            DIALOG libref InsertType NoseRadius InscribedCircle Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype InsertType Descr NoseRadius InscribedCircle Material MaterialDes HolderDes
            UI_NAME "PrimeTurning(TM)"
        } 
        CLASS OD_GROOVING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [11]"
            FILE "qry=od_groove_schema;rset=od_groove_schema;" 
            DIALOG libref CornerRadius InsertWidth SideAngle Material Holder Descr
            RSET   libref  Type SubType UGType UGSubtype Descr Material MaterialDes Holder HolderDes OrientAng InsertWidth CornerRadius Thickness  MaxToolDepth SideAngle RightSang TipAngleGrv MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "OD Grooving"
        } 
        CLASS ID_GROOVING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [12]"
            FILE "qry=inside_groove_schema;rset=inside_groove_schema;" 
            DIALOG libref CornerRadius InsertWidth SideAngle MinBoringDia MaxToolReach Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes Holder HolderDes OrientAng InsertWidth CornerRadius Thickness MaxToolDepth SideAngle RightSang TipAngleGrv MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "ID Grooving"
        }

        CLASS FACE_GROOVING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [13]"
            FILE "qry=face_groove_schema;rset=face_groove_schema;" 
            DIALOG libref CornerRadius InsertWidth SideAngle Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes Holder HolderDes OrientAng InsertWidth CornerRadius Thickness MaxToolDepth SideAngle RightSang TipAngleGrv MinBoringDia MaxToolReach MinFacingDiam MaxFacingDiam XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "Face Grooving"
        }

        CLASS PARTING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [14]"
            FILE "qry=outside_groove_schema;rset=outside_groove_schema;" 
            DIALOG libref PartType CornerRadius InsertWidth  TipAngleGrv SideAngle Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes Holder HolderDes OrientAng InsertWidth CornerRadius Thickness MaxToolDepth SideAngle RightSang TipAngleGrv X_Offset Y_Offset PartType MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "##01Parting"
        } 

        CLASS OD_PROFILING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [21]"
            FILE "qry=outside_profile_schema.bmp;rset=outside_profile_schema;" 
            DIALOG libref Radius SideAnglePF  Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes Holder HolderDes OrientAng Radius SideAnglePF Thickness ReliefAngle MaxToolDepth X_Offset Y_Offset PartType MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "OD Profiling"
        } 

        CLASS ID_PROFILING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [22]"
            FILE "qry=inside_profile_schema.bmp;rset=inside_profile_schema;" 
            DIALOG libref Radius SideAnglePF MinBoringDia MaxToolReach Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes Holder HolderDes OrientAng Radius SideAnglePF Thickness ReliefAngle MaxToolDepth X_Offset Y_Offset PartType MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "ID Profiling"
        }

        CLASS OD_THREADING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [31]"
            FILE "qry=outside_thread_schema;rset=outside_thread_schema;" 
            DIALOG libref ThreadShapeTurn Pitch Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes Holder HolderDes ThreadShapeTurn ThreadDesTurn Pitch OrientAng NoseRadius InsertLength Thickness MaxToolDepth X_Offset Y_Offset MinBoringDia MaxToolReach XMount YMount TrackpointRef IndexNotch TurretRotation
            UI_NAME "OD Threading"
        }

        CLASS ID_THREADING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [32]"
            FILE "qry=inside_thread_schema;rset=inside_thread_schema;" 
            DIALOG libref ThreadShapeTurn Pitch Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes Holder HolderDes ThreadShapeTurn ThreadDesTurn Pitch OrientAng NoseRadius InsertLength Thickness MaxToolDepth X_Offset Y_Offset MinBoringDia MaxToolReach XMount YMount TrackpointRef IndexNotch TurretRotation
            UI_NAME "ID Threading"
        }

        CLASS OD_THREADING_TRIANGULAR_STD
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [35]"
            FILE "qry=outside_thread_schema;rset=outside_thread_schema;" 
            DIALOG libref NoseRadius InsertLength ProfileDepthInsert ProfileDistanceEX ProfileDistanceEY ProfileAngle Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes NoseRadius InsertLength InscribedCircle ThreadPitchMaximum ProfileDepthInsert ProfileDistanceEX ProfileDistanceEY ProfileAngle MaterialDes HolderDes
            UI_NAME "OD Threading Triangular Standard"
        }

        CLASS ID_THREADING_TRIANGULAR_STD
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [36]"
            FILE "qry=inside_thread_schema;rset=inside_thread_schema;" 
            DIALOG libref NoseRadius InsertLength ProfileDepthInsert ProfileDistanceEX ProfileDistanceEY ProfileAngle Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes NoseRadius InsertLength InscribedCircle ThreadPitchMaximum ProfileDepthInsert ProfileDistanceEX ProfileDistanceEY ProfileAngle MaterialDes HolderDes
            UI_NAME "ID Threading Triangular Standard"
        }

        CLASS OD_THREADING_TRIANGULAR_TRAP
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [37]"
            FILE "qry=outside_thread_schema;rset=outside_thread_schema;" 
            DIALOG libref SpotChamfer InsertLength ThreadHeightActual ThreadHeightDifference ThreadHeightTheoretical ProfileDistanceEX ProfileDistanceEY ProfileAngleTrapezoidal Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes SpotChamfer InsertLength InscribedCircle ThreadPitchMaximum ThreadHeightActual ThreadHeightDifference ThreadHeightTheoretical ProfileDistanceEX ProfileDistanceEY ProfileAngleTrapezoidal MaterialDes HolderDes
            UI_NAME "OD Threading Triangular Trapezoidal"
        }

        CLASS ID_THREADING_TRIANGULAR_TRAP
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [38]"
            FILE "qry=inside_thread_schema;rset=inside_thread_schema;" 
            DIALOG libref SpotChamfer InsertLength ThreadHeightActual ThreadHeightDifference ThreadHeightTheoretical ProfileDistanceEX ProfileDistanceEY ProfileAngleTrapezoidal Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes SpotChamfer InsertLength InscribedCircle ThreadPitchMaximum ThreadHeightActual ThreadHeightDifference ThreadHeightTheoretical ProfileDistanceEX ProfileDistanceEY ProfileAngleTrapezoidal MaterialDes HolderDes
            UI_NAME "ID Threading Triangular Trapezoidal"
        }

        CLASS UG_TURNING_STD
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [90]"
            FILE "qry=turn_x_user;rset=turn_x_user;" 
            DIALOG libref NoseRadius InsertNoseAngle OrientAng  CutEdgeLength Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes InsertType OrientAng InsertNoseAngle NoseRadius CutEdgeLength InscribedCircle Thickness ThicknessType ReliefAngle ReliefAngleType MaxToolDepth X_Offset Y_Offset MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "Turning (Standard)"
        } 

        CLASS UG_TURNING_BUTTON
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [91]"
            FILE "qry=turn_r_round;rset=turn_r_round;" 
            DIALOG libref ButtonDia OrientAng Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes InsertType OrientAng ButtonDia Thickness ThicknessType ReliefAngle ReliefAngleType MaxToolDepth X_Offset Y_Offset MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "Turning (Button)"
        } 

        CLASS UG_GROOVING_STD
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [92]"
            FILE "qry=groove_std_tool;rset=groove_std_tool;" 
            DIALOG libref CornerRadius InsertWidth SideAngle2 TipAngleGrv  OrientAng Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes OrientAng InsertWidth CornerRadius Rrad Thickness MaxToolDepth SideAngle2 TipAngleGrv MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "Grooving (Standard)"
        } 

        CLASS UG_GROOVING_FNR
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [93]"
            FILE "qry=groove_fnr_tool;rset=groove_fnr_tool;" 
            DIALOG libref InsertWidth SideAnglePF OrientAng Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes OrientAng InsertWidth SideAnglePF Thickness ReliefAngle MaxToolDepth X_Offset Y_Offset MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "Grooving (Full Nose Radius)"
        } 

        CLASS UG_GROOVING_RING
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [94]"
            FILE "qry=groove_rtj_tool;rset=groove_rtj_tool;" 
            DIALOG libref InsertWidth LeftSang RightSang OrientAng Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes OrientAng NoseWidth Thickness MaxToolDepth LeftSang RightSang MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "Grooving (Ring Type Joint)"
        }
 
        CLASS UG_GROOVING_USER
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [95]"
            FILE "qry=groove_ud_tool;rset=groove_ud_tool;" 
            DIALOG libref InsertWidth LeftSang RightSang Lrad Rrad TipAngleGrv OrientAng Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes OrientAng InsertWidth Thickness MaxToolDepth LeftSang RightSang TipAngleGrv Lrad Rrad MinBoringDia MaxToolReach XMount YMount HolderRef TrackpointRef IndexNotch TurretRotation
            UI_NAME "Grooving (User Defined)"
        } 


        CLASS UG_THREADING_STD
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [96]"
            FILE "qry=thread_std_tool;rset=thread_std_tool;" 
            DIALOG libref LeftAng RightAng OrientAng Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes OrientAng NoseRadius LeftAng RightAng InsertWidth Thickness MaxToolDepth X_Offset Y_Offset MinBoringDia MaxToolReach XMount YMount TrackpointRef IndexNotch TurretRotation
            UI_NAME "Threading (Standard)"
        }

        CLASS UG_THREADING_TRAPEZ
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [97]"
            FILE "qry=thread_trap_tool;rset=thread_trap_tool;" 
            DIALOG libref LeftAng RightAng NoseWidth OrientAng Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes OrientAng NoseWidth LeftAng RightAng InsertWidth Thickness MaxToolDepth X_Offset Y_Offset MinBoringDia MaxToolReach XMount YMount TrackpointRef IndexNotch TurretRotation
            UI_NAME "Threading (Trapez)"
        }
 
        CLASS TURN_FORM
        {
            TYPE QRY
            QUERY  "[DB(SubType)] == [51]"
            FILE "qry=outside_turn_schema;rset=outside_turn_schema;" 
            DIALOG libref Material Holder Descr
            RSET   libref Type SubType UGType UGSubtype Descr Material MaterialDes OrientAng Thickness InitialEdgeAngle InitialEdgeLength MaxToolDepth MinFacingDiam MaxFacingDiam MinBoringDia MaxToolReach XMount YMount TrackpointRef IndexNotch TurretRotation
            UI_NAME "Turn Form Tool"
        } 
    }
}
