script for turning labels on/off?

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

  • script for turning labels on/off?

    I have a Basic script and button I've created to turn cad graphic arrows/whiskers off and on to aid the operators that want to see their profile dimensions that are OOT.
    This has the side effect of turning on all the feature labels while its doing it.
    Is there a way to add to the script so that the labels are turned back off? Or not turn them on in the first place?
    I believe the "Open group" function is the one turning all the labels on. It only turns on the arrows in a group if you open the group first.


    Side question:
    Is it possible to only turn on the arrows for out of tolerance dimensions/features without adding code to each dimension in the program?
    Some sort of "If outtol=1 Then..." I imagine.



    For reference, this is the "arrows on" code:

    Code:
    Dim DmisApp As Object
    Dim DmisPart As Object
    Dim DmisCommands As Object
    Dim DmisCommand As Object
    Sub Part1
    Set DmisApp = CreateObject("PCDLRN.Application")
    Set DmisPart = DmisApp.ActivePartProgram
    Set DmisCommands = DmisPart.Commands
    CommandCount = DmisCommands.Count
    Set DmisCommand = DmisCommands.Item(CommandCount)
    DmisCommands.InsertionPointAfter DmisCommand
    For Each DmisCommand In DmisCommands
    
    If DmisCommand.Type=EW_GROUP_START Then
    retval = DmisCommand.SetToggleString (2, SHOW_DETAILS, 0)
    End If
    
    If DmisCommand.Type=FEATURE_CONTROL_FRAME Then
    retval = DmisCommand.SetToggleString (4, GRAPH_ANALYSIS, 1)
    retval = DmisCommand.PutText ("150.000000", ARROW_MULTIPLIER, 0)
    End If
    
    Next DmisCommand
    End Sub
    Sub Main
    Part1
    DmisPart.RefreshPart
    End Sub

Related Topics

Collapse

Working...
X