Private Sub GetPSMGaugeInfoForDoc_Click(sender As Object, e As EventArgs) Handles GetPSMGaugeInfoForDoc.Click
Dim objApplication As SolidEdgeFramework.Application = Nothing
Dim objSMDoc As SolidEdgePart.SheetMetalDocument = Nothing
Dim myMatTable As SolidEdgeFramework.MatTable = Nothing
Dim strCurrGageName As String = ""
Dim strGageFilePath As String = ""
Dim nMTLUsingExcel As Integer
Dim strMTLGageTableName As String = ""
Dim nDocUsingExcel As Integer
Dim strDocGageTableName As String = ""
Dim nCountBendRadiusVals As Integer
Dim nCountBendAngleVals As Integer
Dim nCountNFVals As Integer
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
Call myMatTable.GetPSMGaugeInfoForDoc(objSMDoc,
strCurrGageName,
strGageFilePath,
nMTLUsingExcel,
strMTLGageTableName,
nDocUsingExcel,
strDocGageTableName,
nCountBendRadiusVals,
nCountBendAngleVals,
nCountNFVals)
MsgBox("Current Gage: " + strCurrGageName)
MsgBox("Current Gage File: " + strGageFilePath)
MsgBox("Material Using Excel: " + nMTLUsingExcel.ToString)
MsgBox("Material Gage Table: " + strMTLGageTableName)
MsgBox("Document Using Excel: " + nDocUsingExcel.ToString)
MsgBox("Document Gage Table: " + strDocGageTableName)
MsgBox("Count Of Bend Radius Values: " + nCountBendRadiusVals.ToString)
MsgBox("Count Of Bend Angle Values: " + nCountBendAngleVals.ToString)
MsgBox("Count Of Bend Neutral Factor Values: " + nCountNFVals.ToString)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub