Solid Edge Framework Type Library
GetMaterialList Method
Returns total number of materials.
Returns List of materials available.
Description
Returns material list from library.
Syntax
Visual Basic
Public Sub GetMaterialList( _
   ByRef plNumMaterials As Long, _
   ByRef listOfMaterials As Variant _
) 
Parameters
plNumMaterials
Returns total number of materials.
listOfMaterials
Returns List of materials available.
Remarks
This is a defunct API. From ST7 onwards, this API will will work only when there is single library. Hence it's recommended to use "GetMaterialListFromLibrary" API which can be used on a specific library when you have multiple libraries.
Example
Imports SolidEdgeFramework
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objMatTable As SolidEdgeFramework.MatTable = Nothing
        Dim plNumMaterials As Integer
        Dim listOfMaterials As Object = Nothing
        Dim strMaterial As Object

        Try
            OleMessageFilter.Register()

            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objMatTable = objApplication.GetMaterialTable()
            objMatTable.GetMaterialList(plNumMaterials, listOfMaterials)

            For Each strMaterial In listOfMaterials
                Console.WriteLine(strMaterial)
            Next
        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

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