Solid Edge Part Type Library
AddStudy Method
Description
Create a new study.
Syntax
Visual Basic
Public Sub AddStudy( _
   ByVal eStudyType As FEAStudyTypeEnum_Auto, _
   ByVal eMeshType As FEAMeshTypeEnum_Auto, _
   ByVal dThickness As Double, _
   ByVal dwOptions As ULong, _
   ByVal ulNumModes As ULong, _
   ByVal dFreqRangeLow As Double, _
   ByVal dFreqRangeHigh As Double, _
   ByVal bstrNasCmdLine As String, _
   ByVal bstrNasKeywordOpts As String, _
   ByVal dwResOptions As ULong, _
   ByRef pActiveStudy As Object _
) 
Parameters
eStudyType
ValueDescription
eStudyTypeLinearBuckling_Auto 
eStudyTypeLinearStatic_Auto 
eStudyTypeNone_Auto 
eStudyTypeNormalModal_Auto 
eStudyTypeSSHT_Auto 
eStudyTypeSSHTLinearBuckling_Auto 
eStudyTypeSSHTLinearStatic_Auto 
eMeshType
ValueDescription
eMeshType2D_Auto 
eMeshTypeMixed_Auto 
eMeshTypeNone_Auto 
eMeshTypeTetrahedral_Auto 
dThickness
dwOptions
ulNumModes
dFreqRangeLow
dFreqRangeHigh
bstrNasCmdLine
bstrNasKeywordOpts
dwResOptions
pActiveStudy
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 eStudyType As SolidEdgePart.FEAStudyTypeEnum_Auto = SolidEdgePart.FEAStudyTypeEnum_Auto.eStudyTypeLinearStatic_Auto
        Dim eMeshType As SolidEdgePart.FEAMeshTypeEnum_Auto = SolidEdgePart.FEAMeshTypeEnum_Auto.eMeshTypeTetrahedral_Auto
        Dim dThickness As Double = 0.1 ' Surface Thickness
        Dim dwOptions As Int32 ' Result Options
        Dim ulNumModes As ULong = 4 ' Number of modes
        Dim dFreqRangeLow As Double = 0.0 ' Minimum frequency value
        Dim dFreqRangeHigh As Double = 1.0 ' Maximum frequenct value
        Dim bstrNasCmdLine As String = "" ' Nastran Command line options
        Dim bstrNasKeywordOpts As String = "" ' Nastran keywords
        Dim dwResOptions As Int32 = 0 ' Result options.

        Try
            OleMessageFilter.Register()

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

            objStudyOwner.AddStudy(eStudyType, _
                                   eMeshType, _
                                   dThickness, _
                                   dwOptions, _
                                   ulNumModes, _
                                   dFreqRangeLow, _
                                   dFreqRangeHigh, _
                                   bstrNasCmdLine, _
                                   bstrNasKeywordOpts, _
                                   dwResOptions, _
                                   objStudy)

        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