hexagon logo

script to hide the tab

Dim app1 As PCDLRN.Application
app1 = CreateObject("PCDLRN.Application")
Dim part As PCDLRN.PartProgram
part = app1.ActivePartProgram
Dim cmds As Object
cmds = part.Commands
Dim cmd As PCDLRN.Command
Dim ok1 As Boolean
ok1 = True
Dim str As Double
For Each cmd In cmds
If cmd.IsDimension Then
If cmd.Type = PCDLRN.OBTYPE.DIMENSION_T_LOCATION Then
str = cmd.DimensionCommand.Deviation
If str > -0.07 Or str < -0.09 Then
ok1 = False
End If
End If
ElseIf cmd.IsDimInfo Then
If ok1 = True Then
cmd.ShowIDOnCad = False
End If
End If
Next