Private Sub Form_Load()
Dim objApp As SolidEdgeFramework.Application
Dim objDoc As SolidEdgePart.PartDocument
Dim objProfileset As SolidEdgePart.ProfileSet
Dim objProfiles As SolidEdgePart.Profiles
Dim objParent As Object
Dim sDumpStatus As String ' Used for temporary storage of datadump return string
' Report errors
Const PI = 3.14159265358979
' Create/get the application with specific settings
On Error Resume Next
Set objApp = GetObject(, "SolidEdge.Application")
If Err Then
Err.Clear
Set objApp = CreateObject("SolidEdge.Application")
Set objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
objApp.Visible = True
Else
Set objDoc = objApp.ActiveDocument
End If
' Create a Profileset object
Set objProfileset = objDoc.ProfileSets.Add
' Add a Profiles collection object to the Profileset
Set objProfiles = objProfileset.Profiles
' Get the Parent property of the Profiles object
Set objParent = objProfiles.Parent
' USER DISPLAY
' Release objects
Set objApp = Nothing
Set objDoc = Nothing
Set objProfileset = Nothing
Set objProfiles = Nothing
Set objParent = Nothing
End Sub