Solid Edge Framework Type Library
PerformGageDataValidation Method
Complete path of Gage excel file.
Name of Gage table.
Gage to be validated as string.
Description
This method is used to validate a Gage for data integrity.
Syntax
Visual Basic
Public Function PerformGageDataValidation( _
   ByVal strExcelFile As String, _
   ByVal strGageTable As String, _
   ByVal strGage As String _
) As Boolean
Parameters
strExcelFile
Complete path of Gage excel file.
strGageTable
Name of Gage table.
strGage
Gage to be validated as string.
Remarks
All Gage validations that are done from the UI are performed using this method.
Example
Imports System.Runtime.InteropServices

Public Class Form1


    '#region PerformGageDataValidation
    Private Sub PerformGageDataValidation_Click(sender As Object, e As EventArgs) Handles PerformGageDataValidation.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objSMDoc As SolidEdgePart.SheetMetalDocument = Nothing
        Dim myMatTable As SolidEdgeFramework.MatTable = Nothing
        Dim bIsValidgage As Boolean = False
        Dim strValidgageTabel As String = "aluminium 6061"
        Dim strValidateThisgage As String = "10 Gage AL"
        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
            bIsValidgage = myMatTable.PerformGageDataValidation(strGageFileName, strValidgageTabel, strValidateThisgage)
            If (bIsValidgage) Then
                MsgBox("The gage " + strValidateThisgage + "is Valid")
            Else
                MsgBox("The gage " + strValidateThisgage + "is Invalid")
            End If
        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 PerformGageDataValidation
    private void PerformGageDataValidation_Click(object sender, EventArgs e)
    {
        SolidEdgeFramework.Application objApplication = null;
        SolidEdgePart.SheetMetalDocument objSMDoc = null;
        SolidEdgeFramework.MatTable myMatTable = null;
        bool bIsValidgage = false;
        string strValidgageTabel = "aluminium 6061";
        string strValidateThisgage = "10 Gage AL";
        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.");
            }
            bIsValidgage = myMatTable.PerformGageDataValidation(strGageFileName, strValidgageTabel, strValidateThisgage);
            if (bIsValidgage)
            {
                MessageBox.Show("The gage " + strValidateThisgage + "is Valid");
            }
            else
            {
                MessageBox.Show("The gage " + strValidateThisgage + "is Invalid");
            }
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
    }
 }
See Also

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