I saw a recent db mod post here and have a similar project in mind.
I would like to use python script to
1. Open/duplicate a mixed hierarchy flt file
2. for all switches in the source, remove them.
3. for all nodes except structure and switches in the destination, remove them.
This is intended to leave two files: the original, minus switches, and a duplicate that only contains switches but the same structure as the source.
I assume that I have to walk the tree for both, and if the node visited is a switch in the source, remove it, and in the duplicate, if it's not a switch (or on the structure), remove it.
How do I process a tree to keep the structure but lose everything else - am I building a list of nodes so I can check if they are part of the tree I need??
I have attached an example of a "mixed hierarchy flt file".
Does anyone have similar code??