AddTree

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

Adds a Tree Object to a serializable Internal Tree Manager

Syntax

AddTree(Name,  trNode)

Parameters

Name
Name of the Tree, this is a globally unique tag used for future access of this tree
trNode
A tree node to be added to the internal manager

Return

True if success.

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())