Private Sub Form_Load()
Dim objApp As SolidEdgeFrameWork.Application
Dim objDoc As SolidEdgedraft.DraftDocument
Dim objSheet As SolidEdgedraft.Sheet
Dim objCircs As SolidEdgeFrameworkSupport.Circles2d
Dim objParent As SolidEdgedraft.Sheet
' 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.DraftDocument")
objApp.Visible = True
Else
Set objDoc = objApp.ActiveDocument
End If
' Get the sheet
Set objSheet = objDoc.ActiveSheet
' Get the Circle2d collection object
Set objCircs = objSheet.Circles2d
' Get the parent of circle2d object
Set objParent = objCircs.Parent
' USER DISPLAY
' Release objects
Set objApp = Nothing
Set objDoc = Nothing
Set objSheet = Nothing
Set objCircs = Nothing
Set objParent = Nothing
End Sub