Solid Edge Framework Type Library
GetPSMGaugeListFromExcel Method
Specify complete path of Gage table.
Returns Number of Gages in Gage Table.
Returns list of Gages in the form of an array.
Description
This method is used to obtain list of Gages from a Gage table.
Syntax
Visual Basic
Public Sub GetPSMGaugeListFromExcel( _
   ByVal bstrGageTableName As String, _
   ByRef plNumGages As Long, _
   ByRef listOfGages As Variant _
) 
Parameters
bstrGageTableName
Specify complete path of Gage table.
plNumGages
Returns Number of Gages in Gage Table.
listOfGages
Returns list of Gages in the form of an array.
Example
Imports System.Runtime.InteropServices

Public Class Form1

    '#region GetPSMGaugeListFromExcel
    Private Sub GetPSMGaugeListFromExcel_Click(sender As Object, e As EventArgs) Handles GetPSMGaugeListFromExcel.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objSMDoc As SolidEdgePart.SheetMetalDocument = Nothing
        Dim myMatTable As SolidEdgeFramework.MatTable = Nothing
        Dim objGageList As Object = Nothing
        Dim nNumofGages As Integer
        Dim strInputgageTable As String = "Stainless Steel"

        Try

            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            ' Get the material table object from the application
            myMatTable = objApplication.GetMaterialTable()
            objSMDoc = objApplication.Documents.Add("SolidEdge.SheetMetalDocument")
            Call myMatTable.GetPSMGaugeListFromExcel(strInputgageTable, nNumofGages, objGageList)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;

public class Form1
{

    //#region GetPSMGaugeListFromExcel
    private void GetPSMGaugeListFromExcel_Click(object sender, EventArgs e)
    {
        SolidEdgeFramework.Application objApplication = null;
        SolidEdgePart.SheetMetalDocument objSMDoc = null;
        SolidEdgeFramework.MatTable myMatTable = null;
        object objGageList = null;
        int nNumofGages = 0;
        string strInputgageTable = "Stainless Steel";

        try
        {

            objApplication = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
            // Get the material table object from the application
            myMatTable = objApplication.GetMaterialTable();
            objSMDoc = objApplication.Documents.Add("SolidEdge.SheetMetalDocument");
            myMatTable.GetPSMGaugeListFromExcel(strInputgageTable, nNumofGages, objGageList);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
    }
}
See Also

MatTable Object  | MatTable Members  | Solid Edge ST5 - What's New