3.2.5 AddTree

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