I am coding a module to display a Struct as a Tree showing the name of the struct element and its value.

In doing this I have to code for each element its name and value.
If the struct changes in the future then I have to make a corresponding change to this display module.

Has anyone developed (or know how to develop) a function that would display a Tree for any struct.

Is there a way to "GetNextElementName" and "GetNextElementValue" of a struct?

Thanks
Archie