Private Sub UseNeutralFactorFromExcel_Click(sender As Object, e As EventArgs) Handles UseNeutralFactorFromExcel.Click
Dim objApplication As SolidEdgeFramework.Application = Nothing
Dim objSMDoc As SolidEdgePart.SheetMetalDocument = Nothing
Dim myMatTable As SolidEdgeFramework.MatTable = Nothing
Dim bUseNFValueFromExcel As Boolean = True
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
MsgBox("Turning ON Option 'Use Neutral Factor From Excel'!")
Call myMatTable.UseNeutralFactorFromExcel(objSMDoc, bUseNFValueFromExcel)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub