Problem
In Doors DXL all modules of a project should be read.
Approach
It is possible to filter for the ItemRef-Type „Formal“ when iterating a project without using recursion.
Solution
// This is necessary that it works
/*******************************************************
* Author: Björn Karpenstein
* Date: 2014-10-08
*
* This DXL script iterates through all formal modules
******************************************************/
void forAllModules(void)
{
Item itemRef;
string shType;
string sItemNameFull;
string sItemName;
Module moduleReference;
string projectName = "/" name(current Project);
print projectName "\n";
for itemRef in project projectName do
{
shType = type(itemRef);
print shType "\t";
sItemNameFull = fullName(itemRef);
print sItemNameFull "\t";
sItemName = name(itemRef);
print sItemName "\n";
if(shType=="Formal")
{
moduleReference = read(sItemNameFull,false);
}
}
}
// Main-Method
void main(void)
{
forAllModules();
}
main();
Für alle Module eine Folders (rekursiv) siehe …
To get all modules from a folder also see …
Ein Gedanke zu „IBM Doors DXL: Durch alle Module eines Projektes Module iterieren/laufen / Iterate all modules in a project“