The object that has this collection
VB: Property Get Parent As IDispatch
C++: IDispatch Parent
C#: IDispatch Parent
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
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)
8.0SR2