Solid Edge Framework Type Library
GetDefaultGageFileName Method
Returns complete path of Gage excel file.
Description
This method is used to get the complete path of the gage excel file.
Syntax
Visual Basic
Public Sub GetDefaultGageFileName( _
   ByRef strGageFileName As String _
) 
Parameters
strGageFileName
Returns complete path of Gage excel file.
Remarks
Path returned is same as path in file locations of Solid Edge options dialog.
Example
Imports System.Runtime.InteropServices

Public Class Form1


    Private Sub GetDefaultGageFileName_Click(sender As Object, e As EventArgs) Handles GetDefaultGageFileName.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objSMDoc As SolidEdgePart.SheetMetalDocument = Nothing
        Dim myMatTable As SolidEdgeFramework.MatTable = Nothing
        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

            Call myMatTable.GetDefaultGageFileName(strGageFileName)
            MsgBox("Default Gage File Location:   " + strGageFileName)
        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
{


    private void GetDefaultGageFileName_Click(object sender, EventArgs e)
    {
        SolidEdgeFramework.Application objApplication = null;
        SolidEdgePart.SheetMetalDocument objSMDoc = null;
        SolidEdgeFramework.MatTable myMatTable = null;
        string strGageFileName = "";

        try
        {

            objApplication = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
            // Get the material table object from the application
            myMatTable = objApplication.GetMaterialTable();

            objSMDoc = objApplication.ActiveDocument;
            if (objSMDoc == null)
            {
                MessageBox.Show("Failed to get Sheet Metal Document object.");
            }

            myMatTable.GetDefaultGageFileName(strGageFileName);
            MessageBox.Show("Default Gage File Location:   " + strGageFileName);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
    }
 }
See Also

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