/* DOORS DXL – Count children objects
*/
You can count the number of child objects in a module –
int childCounter = 0
Object childObject
Object o = current
for childObject in o do {
childCounter++
}
print "\n Method 1 \n"
print "Object " identifier(o) " has " childCounter " child objects.\n"
You could also make use of function –
int countChildObjsFunction(Object o)
{
int childCounter = 0
Object childObject
for childObject in o do {
childCounter++
}
return childCounter
}
//Object
o = current
print "\n Method 2 \n"
print "Object " identifier(o) " has " countChildObjsFunction(o) " child objects.\n"
DOORS DXL Scripting Examples – Count children objects
This post was published by Admin.
Email: admin@TheCloudStrap.Com
