Solid Edge Part Type Library
SetAsmDefaultMaterial Method
Syntax
Visual Basic
Public Sub SetAsmDefaultMaterial( _
   ByVal pDocument As Object _
) 
Parameters
pDocument
Remarks
In case of assemblies some parts may not have material applied. For such parts, we make use of assembly default material while analyzing. This material could be set from simulation options dialog. For setting this material through automation we need to use below method. This method will set "Steel" as default material.
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objAssemblyDocument As SolidEdgeAssembly.AssemblyDocument = Nothing
        Dim objStudyOwner As SolidEdgePart.StudyOwner = Nothing

        Try
            OleMessageFilter.Register()

            ' Connect to Solid Edge
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objAssemblyDocument = objApplication.ActiveDocument

            objStudyOwner = objAssemblyDocument.StudyOwner
            objStudyOwner.SetAsmDefaultMaterial(objAssemblyDocument)

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

StudyOwner Collection  | StudyOwner Members  | Solid Edge ST3 - What's New