Solid Edge Framework Type Library
Parent Property
Description
Returns the parent object for the referenced object.
Property type
Read-only property
Syntax
Visual Basic
Public Property Parent As Object
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgePart.PartDocument
    Dim objSelectSet As SolidEdgeFramework.SelectSet
    Dim objProfile As SolidEdgePart.Profile
    Dim objLine1 As SolidEdgeFrameworkSupport.Line2d
    Dim objLine2 As SolidEdgeFrameworkSupport.Line2d
    Dim objCircle1 As SolidEdgeFrameworkSupport.Circle2d
    Dim objSelSetParent As SolidEdgeFramework.Window
    ' 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 few 2d elements
    Set objProfile = objDoc.ProfileSets.Add.Profiles.Add(pRefPlaneDisp:=objDoc.RefPlanes(1))
    Set objLine1 = objProfile.Lines2d.AddBy2Points(x1:=0, y1:=0, x2:=0.1, y2:=0.1)
    Set objLine2 = objProfile.Lines2d.AddBy2Points(x1:=0, y1:=0, x2:=0, y2:=0.1)
    Set objCircle1 = objProfile.Circles2d.AddByCenterRadius(x:=0, y:=0, Radius:=0.05)
    'Get SelectSet object from the PartDocument
    Set objSelectSet = objDoc.SelectSet
    'Add Line1 to the selectset
    Call objSelectSet.Add(dispatch:=objLine1)
    'Get the Parent object from SelectSet
    Set objSelSetParent = objSelectSet.Parent
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSelectSet = Nothing
    Set objLine1 = Nothing
    Set objLine2 = Nothing
    Set objCircle1 = Nothing
    Set objSelSetParent = Nothing
End Sub
See Also

SelectSet Collection  | SelectSet Members

Send comments on this topic.