How to look at certain dims only?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to look at certain dims only?

    Hi all,

    so i have a part with 200+ features on it, and they changed all the angle tolerances to +-.5degrees. Is there anyway that i could just show my angle dimensions on the program so i can change them instead of going through every dimension one by one? Like if i want to see 2d distances only then see those only,etc

  • #2
    You could use the search function (ALT+F3) to search for 2D ANGLE or 3D ANGLE. This will allow you to step through your program and edit each call out. You could do the same thing with a script to automate the process which would probably be a lot quicker if you have lots of programs to edit.

    This should work for all 3D or 2D angle dimensions. When you run it, it will aske you to enter a +TOL and then a -TOL before replacing all the tolerances in all existing 2D or 3D angle dimensions.

    Code:
    Dim DmisApp As Object
    Dim DmisPart As Object
    Dim DmisCommands As Object
    Dim DmisCommand As Object
    
    Sub Main
    Set DmisApp = CreateObject("PCDLRN.Application")
    Set DmisPart = DmisApp.ActivePartProgram
    Set DmisCommands = DmisPart.Commands
    CommandCount = DmisCommands.Count
    Set DmisCommand = DmisCommands.Item(CommandCount)
    DmisCommands.InsertionPointAfter DmisCommand
    
    myTitle$ = " "
    Prompt$ = "Enter the +TOL value"
    Default$ = ""
    X% = 200
    T% = 200
    PTOL$ = InputBox$(Prompt$,myTitle$,Default$,X%,Y%)
    
    myTitle$ = " "
    Prompt$ = "Enter the -TOL value"
    Default$ = ""
    X% = 200
    T% = 200
    MTOL$ = InputBox$(Prompt$,myTitle$,Default$,X%,Y%)
    
    For Each DmisCommand In DmisCommands
    If DmisCommand.Type = 1108 Or DmisCommand.Type = 1109 Then
    ' Set Plus Tolerance = PTOL$
    retval = DmisCommand.PutText (PTOL$, 167, 0)
    ' Set Minus Tolerance = MTOL$
    retval = DmisCommand.PutText (MTOL$, 168, 0)
    DmisCommand.ReDraw
    End If
    Next
    
    DmisPart.RefreshPart
    End Sub
    Last edited by neil.challinor; 07-17-2020, 10:46 AM.
    Neil Challinor
    PC-DMIS Product Owner

    T: +44 870 446 2667 (Hexagon UK office)
    E: [email protected]

    Comment


    • #3
      Originally posted by neil.challinor View Post
      You could use the search function (ALT+F3) to search for 2D ANGLE or 3D ANGLE. This will allow you to step through your program and edit each call out. You could do the same thing with a script to automate the process which would probably be a lot quicker if you have lots of programs to edit.

      This should work for all 3D or 2D angle dimensions. When you run it, it will aske you to enter a +TOL and then a -TOL before replacing all the tolerances in all existing 2D or 3D angle dimensions.

      Code:
      Dim DmisApp As Object
      Dim DmisPart As Object
      Dim DmisCommands As Object
      Dim DmisCommand As Object
      
      Sub Main
      Set DmisApp = CreateObject("PCDLRN.Application")
      Set DmisPart = DmisApp.ActivePartProgram
      Set DmisCommands = DmisPart.Commands
      CommandCount = DmisCommands.Count
      Set DmisCommand = DmisCommands.Item(CommandCount)
      DmisCommands.InsertionPointAfter DmisCommand
      
      myTitle$ = " "
      Prompt$ = "Enter the +TOL value"
      Default$ = ""
      X% = 200
      T% = 200
      PTOL$ = InputBox$(Prompt$,myTitle$,Default$,X%,Y%)
      
      myTitle$ = " "
      Prompt$ = "Enter the -TOL value"
      Default$ = ""
      X% = 200
      T% = 200
      MTOL$ = InputBox$(Prompt$,myTitle$,Default$,X%,Y%)
      
      For Each DmisCommand In DmisCommands
      If DmisCommand.Type = 1108 Or DmisCommand.Type = 1109 Then
      ' Set Plus Tolerance = PTOL$
      retval = DmisCommand.PutText (PTOL$, 167, 0)
      ' Set Minus Tolerance = MTOL$
      retval = DmisCommand.PutText (MTOL$, 168, 0)
      DmisCommand.ReDraw
      End If
      Next
      
      DmisPart.RefreshPart
      End Sub
      AWESOME! Thank you so much

      Comment

      Related Topics

      Collapse

      Working...
      X