2.1.1 ActiveFolder


Description

Syntax

VB: Property Get/Set ActiveFolder As Folder
C++: Folder ActiveFolder
C#: Folder ActiveFolder

Remark

Examples

The following example test to see if a subfolder called "Test" existed, and only if not, then add and create new graph window inside it.

VB

Private Sub CommandButton1_Click()
    Dim app As Origin.Application
    Dim fldr As Origin.Folder
    Dim fldr1 As Origin.Folder
    Set app = New Origin.ApplicationSI
    
    Set fldr = app.ActiveFolder
    Set fldr1 = fldr.Folders("Test")
    If fldr1 Is Nothing Then
        Set fldr1 = fldr.Folders.Add("Test")
    End If
    fldr1.Activate
    app.GraphPages.Add ("origin") 'Add a new Graph to the new folder
    app.Visible = MAINWND_SHOW_BRING_TO_FRONT
End Sub

Python

import OriginExt as O
app = O.Application(); app.Visible = app.MAINWND_SHOW
print(app.ActiveFolder.Path)

Version Information

8.0SR2

See Also