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 dThickness As Double = 0.0025
Dim dwOptions As UInt32 = 0
Dim ulNumModes As ULong = 6
Dim dFreqRangeLow As Double = 1.5
Dim dFreqRangeHigh As Double = 2.5
Dim strNasCmdLine As String = "" 'Command line options
Dim strNasKeywordOpts As String = "" ' Keyword options
Dim dwResOptions As UInt32 = 0
Dim objGeomArray(0) As Object
Try
OleMessageFilter.Register()
' Connect to Solid Edge
objApplication = Marshal.GetActiveObject("SolidEdge.Application")
objPartDocument = objApplication.ActiveDocument
objStudyOwner = objPartDocument.StudyOwner
objStudyOwner.GetActiveStudy(objStudy)
' Populate objGeomArray.
objStudy.EditOptions(objGeomArray, _
dThickness, _
dwOptions, _
ulNumModes, _
dFreqRangeLow, _
dFreqRangeHigh, _
strNasCmdLine, _
strNasKeywordOpts, _
dwResOptions)
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
OleMessageFilter.Revoke()
End Try
End Sub
End Module