2.32.2 Parent


Description

The object that has this collection

Syntax

VB: Property Get Parent As IDispatch
C++: IDispatch Parent
C#: IDispatch Parent

Remark

Examples

VB

    Sub GetParent()
        'This code show active page's name using Parent property of a collection
        Dim app As Origin.IOApplication
        Dim obj As Origin.OriginObject
        Dim cls As Origin.CollectionsBase

        app = New Origin.ApplicationSI
        cls = app.ActivePage.Layers
        obj = cls.Parent
        Dim name As String
        name = obj.Name
        MsgBox(name)
    End Sub

Python

import OriginExt as O
app = O.Application(); app.Visible = app.MAINWND_SHOW
pageName = app.CreatePage(app.OPT_WORKSHEET)
pg = app.Pages(pageName)
ly = pg.Layers(0)
lyParent = ly.Parent
print(lyParent.Name + " " + pg.Name)

Version Information

8.0SR2

See Also