Ignition 8.1.7: Perspective Tree Component - Copy from one Tree to another Tree

Was wondering if any of the gurus in Python might know of a novel way to do the following between two (2) Tree components in Perspective:

  1. Select some random branches within one tree (Source Tree)
  2. Copy the selected branches into a new tree (Target Tree)

The challenge is that the Source Tree can be of any arbitrary configuration. I have populated the Source Tree using the method described here: system.tag.browse - Ignition User Manual 8.1 - Ignition Documentation, but can’t figure out how to copy over to the Target Tree. It doesn’t seem trivial to me.

How would you determine the depth of the tree nodes if they (will most likely) be disjoint and at different levels, like your screenshot? Do you want to put all of the selected nodes as children of a new node, all at the same level? Are you trying to do this through scripting?

EDIT: Another Q: Are you trying to do this in the designer or during runtime?

YF129701

We are trying to do this during runtime. So the illustration would copy over as: (pardon my text illustration)

  1. Company 1
    • Plant 1
  2.     - Area 1
    
  3.        - Equip 1
    
  4.        - Equip 2
    
  5. WF
  6. - Inverness
    
  7.     - Woodroom
    

So the Parent and associate branch would be part of the copy as the Children would need to show the Parent node that they are coming from. This wasn’t clear in my illustration. Hopefully this sheds more light on the problem.

Updated illustration to hopefully make it more clear. So in this example, the selections copy the branch from root to leaf of selected item.