MItDag offers a convenient way to iterate over the DAG nodes in any Maya scene, but not in a way that is useful for populating the visited nodes in a Windows tree control. This is because MItDag gives a linear list of nodes that make it a little bit difficult