public void DumpTraverseComponent(Component2 swComp, long nLevel, ref string asciitext)
{
// *** SCAN THE COMPONENT FEATURES
if (!swComp.IsRoot())
{
Feature swFeat;
swFeat = (Feature)swComp.FirstFeature();
DumpTraverseFeatures(swFeat, nLevel, ref asciitext);
}
// *** RECURSIVE SCAN CHILDREN COMPONENTS
object[] vChildComp;
Component2 swChildComp;
string sPadStr = " ";
long i = 0;
for (i = 0; i <= nLevel - 1; i++)
{
sPadStr = sPadStr + " ";
}
vChildComp = (object[])swComp.GetChildren();
for (i = 0; i < vChildComp.Length; i++)
{
swChildComp = (Component2)vChildComp[i];
asciitext += sPadStr + "+" + swChildComp.Name2 + " <" + swChildComp.ReferencedConfiguration + ">" +"\n";
// DumpTraverseComponentFeatures(swChildComp, nLevel, ref asciitext);
DumpTraverseComponent(swChildComp, nLevel + 1, ref asciitext);
}
}