Does anyone know a way to count all the dimensions that are out of tolerance in a PC-DMIS app?
I have tried the following V. B. (found on Wilkox site):
Set App = CreateObject("PCDLRN.Application")
Set Part = App.ActivePartProgram
Set Cmds = Part.Commands
For Each Cmd In Cmds
If Cmd.IsDimension Then
...
Set DimCmd = Cmd.DimensionCommand
If DimCmd.OutTol > 0 Then
NumberOut = NumberOut + 1
Else
NumberIn = NumberIn + 1
End If
...
The problem is, this does not handle dimensions that are stored in arrays, which we use a lot of. Many of the features we are measuring are placed at periodic angles, and we measure them in a loop which creates arrays of the dimensions which cannot be accessed using the above code.
Any help would be greatly appreciated.
I have tried the following V. B. (found on Wilkox site):
Set App = CreateObject("PCDLRN.Application")
Set Part = App.ActivePartProgram
Set Cmds = Part.Commands
For Each Cmd In Cmds
If Cmd.IsDimension Then
...
Set DimCmd = Cmd.DimensionCommand
If DimCmd.OutTol > 0 Then
NumberOut = NumberOut + 1
Else
NumberIn = NumberIn + 1
End If
...
The problem is, this does not handle dimensions that are stored in arrays, which we use a lot of. Many of the features we are measuring are placed at periodic angles, and we measure them in a loop which creates arrays of the dimensions which cannot be accessed using the above code.
Any help would be greatly appreciated.
Comment