Solid Edge Framework Type Library
SetDocumentToGageTableAssociation Method
Sheet Metal Document.
Specify Gage table name as string.
Specify Gage as string.
Set as "True" is you wish to use neutral factor from excel file else set as "False".
Set as "True" if you wish to create an association between the sheet metal file and the Gage table else set as "False".
Description
This method will create an association between the sheet metal file and the Gage table.
Syntax
Visual Basic
Public Sub SetDocumentToGageTableAssociation( _
   ByVal pDocument As Object, _
   ByVal bstrDocGageName As String, _
   ByVal bstrDocGageTableName As String, _
   ByVal bUseNeutralFactorFromExcel As Boolean, _
   ByVal bAddAssociation As Boolean _
) 
Parameters
pDocument
Sheet Metal Document.
bstrDocGageName
Specify Gage table name as string.
bstrDocGageTableName
Specify Gage as string.
bUseNeutralFactorFromExcel
Set as "True" is you wish to use neutral factor from excel file else set as "False".
bAddAssociation
Set as "True" if you wish to create an association between the sheet metal file and the Gage table else set as "False".
Example
Private Sub SetDocumentToGageTableAssociation_Click(sender As Object, e As EventArgs) Handles SetDocumentToGageTableAssociation.Click
    Dim objApplication As SolidEdgeFramework.Application = Nothing
    Dim objSMDoc As SolidEdgePart.SheetMetalDocument = Nothing
    Dim myMatTable As SolidEdgeFramework.MatTable = Nothing
    Dim bUseNFFromExcel As Boolean = True
    Dim bAddAssociation As Boolean = True
    Dim strInputGage As String = "16 gage"
    Dim strInutGageTable As String = "Stainless Steel"

    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("Adding 'Document to Gage Table' Association!")
        Call myMatTable.SetDocumentToGageTableAssociation(objSMDoc, strInputGage, strInutGageTable, bUseNFFromExcel, bAddAssociation)

        MsgBox("Removing 'Document to Gage Table' Association!")
        bUseNFFromExcel = False
        bAddAssociation = False
        strInputGage = ""
        strInutGageTable = ""
        Call myMatTable.SetDocumentToGageTableAssociation(objSMDoc, strInputGage, strInutGageTable, bUseNFFromExcel, bAddAssociation)

    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
End Sub
See Also

MatTable Object  | MatTable Members