Private Sub PerformGageDataValidation_Click(sender As Object, e As EventArgs) Handles PerformGageDataValidation.Click
Dim objApplication As SolidEdgeFramework.Application = Nothing
Dim objSMDoc As SolidEdgePart.SheetMetalDocument = Nothing
Dim myMatTable As SolidEdgeFramework.MatTable = Nothing
Dim bIsValidgage As Boolean = False
Dim strValidgageTabel As String = "aluminium 6061"
Dim strValidateThisgage As String = "10 Gage AL"
Dim strGageFileName As String = ""
Try
objApplication = Marshal.GetActiveObject("SolidEdge.Application")
' Get the material table object from the application
myMatTable = objApplication.GetMaterialTable()
objSMDoc = objApplication.ActiveDocument
If (objSMDoc Is Nothing) Then
MsgBox("Failed to get Sheet Metal Document object.")
End If
bIsValidgage = myMatTable.PerformGageDataValidation(strGageFileName, strValidgageTabel, strValidateThisgage)
If (bIsValidgage) Then
MsgBox("The gage " + strValidateThisgage + "is Valid")
Else
MsgBox("The gage " + strValidateThisgage + "is Invalid")
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub