8.2.19 GetTree

It is recommended that you switch to the originpro package. PyOrigin is primarily for users who need to work with Origin version prior to 2021.


Description

Returns the Tree if available, referred to by name, Name

Syntax

GetTree(treeName)

Parameters

treeName
Name of the Tree

Return

Treenode

Examples

import PyOrigin
NewTree = PyOrigin.EmptyTree()
if(NewTree.IsValid()):
    NewTree.SetName('NEW')
    NewTree.SetStrValue('TEST')
    PyOrigin.AddTree('ADD', NewTree)
    OldTree = PyOrigin.GetTree('ADD')
    print("%s" %  OldTree.GetStrValue())