refer to the current Origin instance
VB: Property Get Application As IOApplication
C++: IOApplication Application
C#: IOApplication Application
Sub GetApplication() Dim app As Origin.IOApplication Dim ly As Origin.Layer Dim wksPage As Origin.WorksheetPage app = New Origin.ApplicationSI ly = app.ActivePage.Layers(-1) 'get active layer of current project wksPage = ly.Application.WorksheetPages.Add() ' use application to create new worksheetpage wksPage.Name = "UserBook" 'rename workbook wksPage.Activate() 'bring it to the front End Sub
import OriginExt as O app = O.Application(); app.Visible = app.MAINWND_SHOW pageName = app.CreatePage(app.OPT_WORKSHEET) pg = app.Pages(pageName) print(pg.Application.IsModified)
8.0SR2