hexagon logo

Dimensioning Torus

I have a question about a measured torus hopefully someone can answer. This is also my first post here, so bear with me Slight smile. I've searched a bit but I haven't seen anything that answers my question. Basically, I need to figure out the minor diameter of this torus. If I hover over that feature in the Edit toolbar, under the ACTL measurements I can see the measurement i’m looking for (the .25027). I’m trying to figure out a way to dimension it or manually extract it using a variable or anything related to that. Any suggestions?


Parents
  • 
    'Part 2:
    
    Set PCDCommand = PCDCommands.Add(GENERIC_CONSTRUCTION, True)
    PCDCommand.Marked = True
    retval = PCDCommand.PutText ("0", THEO_X, 0)
    retval = PCDCommand.PutText ("0", THEO_Y, 0)
    retval = PCDCommand.PutText ("0", THEO_Z, 0)
    retval = PCDCommand.PutText ("0", THEO_X2, 0)
    retval = PCDCommand.PutText ("0", THEO_Y2, 0)
    retval = PCDCommand.PutText ("0", THEO_Z2, 0)
    retval = PCDCommand.PutText ("0", THEO_I, 0)
    retval = PCDCommand.PutText ("0", THEO_J, 0)
    retval = PCDCommand.PutText ("1", THEO_K, 0)
    retval = PCDCommand.PutText ("1", THEO_RADIUS, 0)
    retval = PCDCommand.PutText ("0", MEAS_X, 0)
    retval = PCDCommand.PutText ("0", MEAS_Y, 0)
    retval = PCDCommand.PutText ("0", MEAS_Z, 0)
    retval = PCDCommand.PutText ("0", MEAS_X2, 0)
    retval = PCDCommand.PutText ("0", MEAS_Y2, 0)
    retval = PCDCommand.PutText ("0", MEAS_Z2, 0)
    retval = PCDCommand.PutText ("0", MEAS_I, 0)
    retval = PCDCommand.PutText ("0", MEAS_J, 0)
    retval = PCDCommand.PutText ("1", MEAS_K, 0)
    retval = PCDCommand.PutText ("1", MEAS_RADIUS, 0)
    retval = PCDCommand.PutText (TorID & "_OUTER_DIA", ID, 0)
    retval = PCDCommand.SetToggleString (4, GEN_FEAT_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, GEN_ALIGN_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, COORD_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, INOUT_TYPE, 0)
    Result = PCDCommand.SetExpression("GETTEXT(920,0,{" & TorID & "})/2+" & TorID &"." & "TRAD" & " ", THEO_RADIUS, 0)
    Result = PCDCommand.SetExpression("GETTEXT(921,0,{" & TorID & "})/2+" & TorID &"." & "RAD" & " ", MEAS_RADIUS, 0)
    Result = PCDCommand.SetExpression("GETTEXT(7,0,{" & TorID & "})", THEO_X, 0)
    Result = PCDCommand.SetExpression("GETTEXT(8,0,{" & TorID & "})", THEO_Y, 0)
    Result = PCDCommand.SetExpression("GETTEXT(9,0,{" & TorID & "})", THEO_Z, 0)
    Result = PCDCommand.SetExpression("GETTEXT(16,0,{" & TorID & "})", THEO_I, 0)
    Result = PCDCommand.SetExpression("GETTEXT(17,0,{" & TorID & "})", THEO_J, 0)
    Result = PCDCommand.SetExpression("GETTEXT(18,0,{" & TorID & "})", THEO_K, 0)
    Result = PCDCommand.SetExpression("GETTEXT(22,0,{" & TorID & "})", MEAS_X, 0)
    Result = PCDCommand.SetExpression("GETTEXT(23,0,{" & TorID & "})", MEAS_Y, 0)
    Result = PCDCommand.SetExpression("GETTEXT(24,0,{" & TorID & "})", MEAS_Z, 0)
    Result = PCDCommand.SetExpression("GETTEXT(25,0,{" & TorID & "})", MEAS_I, 0)
    Result = PCDCommand.SetExpression("GETTEXT(26,0,{" & TorID & "})", MEAS_J, 0)
    Result = PCDCommand.SetExpression("GETTEXT(27,0,{" & TorID & "})", MEAS_K, 0)
    Result = PCDCommand.SetExpression("GETTEXT(40,0,{" & TorID & "})",INOUT_TYPE,0)
    PCDCommand.ReDraw
    PCDPartProgram.RefreshPart
    
    Set PCDCommand = PCDCommands.Add(GENERIC_CONSTRUCTION, True)
    PCDCommand.Marked = True
    retval = PCDCommand.PutText ("0", THEO_X, 0)
    retval = PCDCommand.PutText ("0", THEO_Y, 0)
    retval = PCDCommand.PutText ("0", THEO_Z, 0)
    retval = PCDCommand.PutText ("0", THEO_X2, 0)
    retval = PCDCommand.PutText ("0", THEO_Y2, 0)
    retval = PCDCommand.PutText ("0", THEO_Z2, 0)
    retval = PCDCommand.PutText ("0", THEO_I, 0)
    retval = PCDCommand.PutText ("0", THEO_J, 0)
    retval = PCDCommand.PutText ("1", THEO_K, 0)
    retval = PCDCommand.PutText ("1", THEO_RADIUS, 0)
    retval = PCDCommand.PutText ("0", MEAS_X, 0)
    retval = PCDCommand.PutText ("0", MEAS_Y, 0)
    retval = PCDCommand.PutText ("0", MEAS_Z, 0)
    retval = PCDCommand.PutText ("0", MEAS_X2, 0)
    retval = PCDCommand.PutText ("0", MEAS_Y2, 0)
    retval = PCDCommand.PutText ("0", MEAS_Z2, 0)
    retval = PCDCommand.PutText ("0", MEAS_I, 0)
    retval = PCDCommand.PutText ("0", MEAS_J, 0)
    retval = PCDCommand.PutText ("1", MEAS_K, 0)
    retval = PCDCommand.PutText ("1", MEAS_RADIUS, 0)
    retval = PCDCommand.PutText (TorID & "_INNER_DIA", ID, 0)
    retval = PCDCommand.SetToggleString (4, GEN_FEAT_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, GEN_ALIGN_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, COORD_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, INOUT_TYPE, 0)
    Result = PCDCommand.SetExpression("GETTEXT(920,0,{" & TorID & "})/2+" & TorID &"." & "TRAD" & "/2 ", THEO_RADIUS, 0)
    Result = PCDCommand.SetExpression("GETTEXT(921,0,{" & TorID & "})/2+" & TorID &"." & "RAD" & "/2 ", MEAS_RADIUS, 0)
    Result = PCDCommand.SetExpression("GETTEXT(7,0,{" & TorID & "})", THEO_X, 0)
    Result = PCDCommand.SetExpression("GETTEXT(8,0,{" & TorID & "})", THEO_Y, 0)
    Result = PCDCommand.SetExpression("GETTEXT(9,0,{" & TorID & "})", THEO_Z, 0)
    Result = PCDCommand.SetExpression("GETTEXT(16,0,{" & TorID & "})", THEO_I, 0)
    Result = PCDCommand.SetExpression("GETTEXT(17,0,{" & TorID & "})", THEO_J, 0)
    Result = PCDCommand.SetExpression("GETTEXT(18,0,{" & TorID & "})", THEO_K, 0)
    Result = PCDCommand.SetExpression("GETTEXT(22,0,{" & TorID & "})", MEAS_X, 0)
    Result = PCDCommand.SetExpression("GETTEXT(23,0,{" & TorID & "})", MEAS_Y, 0)
    Result = PCDCommand.SetExpression("GETTEXT(24,0,{" & TorID & "})", MEAS_Z, 0)
    Result = PCDCommand.SetExpression("GETTEXT(25,0,{" & TorID & "})", MEAS_I, 0)
    Result = PCDCommand.SetExpression("GETTEXT(26,0,{" & TorID & "})", MEAS_J, 0)
    Result = PCDCommand.SetExpression("GETTEXT(27,0,{" & TorID & "})", MEAS_K, 0)
    Result = PCDCommand.SetExpression("GETTEXT(40,0,{" & TorID & "})",INOUT_TYPE,0)
    PCDCommand.ReDraw
    PCDPartProgram.RefreshPart
    End If
    
    '***** Cleanup
    Set PCDApp = Nothing
    Set PCDPartPrograms = Nothing
    Set PCDPartProgram = Nothing
    Set PCDCommands = Nothing
    Set prbhit = Nothing
    '*****
    
    End Sub
    
Reply
  • 
    'Part 2:
    
    Set PCDCommand = PCDCommands.Add(GENERIC_CONSTRUCTION, True)
    PCDCommand.Marked = True
    retval = PCDCommand.PutText ("0", THEO_X, 0)
    retval = PCDCommand.PutText ("0", THEO_Y, 0)
    retval = PCDCommand.PutText ("0", THEO_Z, 0)
    retval = PCDCommand.PutText ("0", THEO_X2, 0)
    retval = PCDCommand.PutText ("0", THEO_Y2, 0)
    retval = PCDCommand.PutText ("0", THEO_Z2, 0)
    retval = PCDCommand.PutText ("0", THEO_I, 0)
    retval = PCDCommand.PutText ("0", THEO_J, 0)
    retval = PCDCommand.PutText ("1", THEO_K, 0)
    retval = PCDCommand.PutText ("1", THEO_RADIUS, 0)
    retval = PCDCommand.PutText ("0", MEAS_X, 0)
    retval = PCDCommand.PutText ("0", MEAS_Y, 0)
    retval = PCDCommand.PutText ("0", MEAS_Z, 0)
    retval = PCDCommand.PutText ("0", MEAS_X2, 0)
    retval = PCDCommand.PutText ("0", MEAS_Y2, 0)
    retval = PCDCommand.PutText ("0", MEAS_Z2, 0)
    retval = PCDCommand.PutText ("0", MEAS_I, 0)
    retval = PCDCommand.PutText ("0", MEAS_J, 0)
    retval = PCDCommand.PutText ("1", MEAS_K, 0)
    retval = PCDCommand.PutText ("1", MEAS_RADIUS, 0)
    retval = PCDCommand.PutText (TorID & "_OUTER_DIA", ID, 0)
    retval = PCDCommand.SetToggleString (4, GEN_FEAT_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, GEN_ALIGN_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, COORD_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, INOUT_TYPE, 0)
    Result = PCDCommand.SetExpression("GETTEXT(920,0,{" & TorID & "})/2+" & TorID &"." & "TRAD" & " ", THEO_RADIUS, 0)
    Result = PCDCommand.SetExpression("GETTEXT(921,0,{" & TorID & "})/2+" & TorID &"." & "RAD" & " ", MEAS_RADIUS, 0)
    Result = PCDCommand.SetExpression("GETTEXT(7,0,{" & TorID & "})", THEO_X, 0)
    Result = PCDCommand.SetExpression("GETTEXT(8,0,{" & TorID & "})", THEO_Y, 0)
    Result = PCDCommand.SetExpression("GETTEXT(9,0,{" & TorID & "})", THEO_Z, 0)
    Result = PCDCommand.SetExpression("GETTEXT(16,0,{" & TorID & "})", THEO_I, 0)
    Result = PCDCommand.SetExpression("GETTEXT(17,0,{" & TorID & "})", THEO_J, 0)
    Result = PCDCommand.SetExpression("GETTEXT(18,0,{" & TorID & "})", THEO_K, 0)
    Result = PCDCommand.SetExpression("GETTEXT(22,0,{" & TorID & "})", MEAS_X, 0)
    Result = PCDCommand.SetExpression("GETTEXT(23,0,{" & TorID & "})", MEAS_Y, 0)
    Result = PCDCommand.SetExpression("GETTEXT(24,0,{" & TorID & "})", MEAS_Z, 0)
    Result = PCDCommand.SetExpression("GETTEXT(25,0,{" & TorID & "})", MEAS_I, 0)
    Result = PCDCommand.SetExpression("GETTEXT(26,0,{" & TorID & "})", MEAS_J, 0)
    Result = PCDCommand.SetExpression("GETTEXT(27,0,{" & TorID & "})", MEAS_K, 0)
    Result = PCDCommand.SetExpression("GETTEXT(40,0,{" & TorID & "})",INOUT_TYPE,0)
    PCDCommand.ReDraw
    PCDPartProgram.RefreshPart
    
    Set PCDCommand = PCDCommands.Add(GENERIC_CONSTRUCTION, True)
    PCDCommand.Marked = True
    retval = PCDCommand.PutText ("0", THEO_X, 0)
    retval = PCDCommand.PutText ("0", THEO_Y, 0)
    retval = PCDCommand.PutText ("0", THEO_Z, 0)
    retval = PCDCommand.PutText ("0", THEO_X2, 0)
    retval = PCDCommand.PutText ("0", THEO_Y2, 0)
    retval = PCDCommand.PutText ("0", THEO_Z2, 0)
    retval = PCDCommand.PutText ("0", THEO_I, 0)
    retval = PCDCommand.PutText ("0", THEO_J, 0)
    retval = PCDCommand.PutText ("1", THEO_K, 0)
    retval = PCDCommand.PutText ("1", THEO_RADIUS, 0)
    retval = PCDCommand.PutText ("0", MEAS_X, 0)
    retval = PCDCommand.PutText ("0", MEAS_Y, 0)
    retval = PCDCommand.PutText ("0", MEAS_Z, 0)
    retval = PCDCommand.PutText ("0", MEAS_X2, 0)
    retval = PCDCommand.PutText ("0", MEAS_Y2, 0)
    retval = PCDCommand.PutText ("0", MEAS_Z2, 0)
    retval = PCDCommand.PutText ("0", MEAS_I, 0)
    retval = PCDCommand.PutText ("0", MEAS_J, 0)
    retval = PCDCommand.PutText ("1", MEAS_K, 0)
    retval = PCDCommand.PutText ("1", MEAS_RADIUS, 0)
    retval = PCDCommand.PutText (TorID & "_INNER_DIA", ID, 0)
    retval = PCDCommand.SetToggleString (4, GEN_FEAT_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, GEN_ALIGN_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, COORD_TYPE, 0)
    retval = PCDCommand.SetToggleString (1, INOUT_TYPE, 0)
    Result = PCDCommand.SetExpression("GETTEXT(920,0,{" & TorID & "})/2+" & TorID &"." & "TRAD" & "/2 ", THEO_RADIUS, 0)
    Result = PCDCommand.SetExpression("GETTEXT(921,0,{" & TorID & "})/2+" & TorID &"." & "RAD" & "/2 ", MEAS_RADIUS, 0)
    Result = PCDCommand.SetExpression("GETTEXT(7,0,{" & TorID & "})", THEO_X, 0)
    Result = PCDCommand.SetExpression("GETTEXT(8,0,{" & TorID & "})", THEO_Y, 0)
    Result = PCDCommand.SetExpression("GETTEXT(9,0,{" & TorID & "})", THEO_Z, 0)
    Result = PCDCommand.SetExpression("GETTEXT(16,0,{" & TorID & "})", THEO_I, 0)
    Result = PCDCommand.SetExpression("GETTEXT(17,0,{" & TorID & "})", THEO_J, 0)
    Result = PCDCommand.SetExpression("GETTEXT(18,0,{" & TorID & "})", THEO_K, 0)
    Result = PCDCommand.SetExpression("GETTEXT(22,0,{" & TorID & "})", MEAS_X, 0)
    Result = PCDCommand.SetExpression("GETTEXT(23,0,{" & TorID & "})", MEAS_Y, 0)
    Result = PCDCommand.SetExpression("GETTEXT(24,0,{" & TorID & "})", MEAS_Z, 0)
    Result = PCDCommand.SetExpression("GETTEXT(25,0,{" & TorID & "})", MEAS_I, 0)
    Result = PCDCommand.SetExpression("GETTEXT(26,0,{" & TorID & "})", MEAS_J, 0)
    Result = PCDCommand.SetExpression("GETTEXT(27,0,{" & TorID & "})", MEAS_K, 0)
    Result = PCDCommand.SetExpression("GETTEXT(40,0,{" & TorID & "})",INOUT_TYPE,0)
    PCDCommand.ReDraw
    PCDPartProgram.RefreshPart
    End If
    
    '***** Cleanup
    Set PCDApp = Nothing
    Set PCDPartPrograms = Nothing
    Set PCDPartProgram = Nothing
    Set PCDCommands = Nothing
    Set prbhit = Nothing
    '*****
    
    End Sub
    
Children
No Data