Solid Edge Part Type Library
GetNastranErrorMessage Method
Description
Get NASTRAN error message string.
Syntax
Visual Basic
Public Sub GetNastranErrorMessage( _
   ByRef bstrScratchDirLoc As String _
) 
Parameters
bstrScratchDirLoc
Remarks
While meshing or solving a model if we fail for some reason then the error message returned from NASTRAN can be fetched using this API. The error message will also provide recommended action for the user.
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDocument As SolidEdgePart.PartDocument = Nothing
        Dim objStudyOwner As SolidEdgePart.StudyOwner = Nothing
        Dim objStudy As SolidEdgePart.Study = Nothing
        Dim strNSTErrorMsg As String = ""

        Try
            OleMessageFilter.Register()

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

            objStudyOwner = objPartDocument.StudyOwner
            objStudyOwner.GetActiveStudy(objStudy)

            objStudy.GetNastranErrorMessage(strNSTErrorMsg)

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

Study Object  | Study Members  | Solid Edge ST3 - What's New