Question & Answer
Question
What is the procedure to create an indented list of the unique identifiers for the IBM Rational DOORS database contents?
Answer
To create an indented list of the unique identifiers for the DOORS database in a text file, run the script below in the DXL editor window.
In the DOORS database explore window:
- Click Tools > Edit DXL... to open the DXL editor
- Paste the contents of the script below to the DXL input window
- Click Run to execute the script:
// this dxl outputs an indented list of a database hierarchy that includes directory index numbers
// Leave topfoldername as "/" to print out the whole database hierarchy
// Change it to some folder name to print out the hierarchy under a specific database location
string topfoldername = "/"
// Put your desired output file name here...
string filename = "c:\\hlist.txt"
Stream outfile = write(filename)
void listIndices(Folder parent, int level)
{
Item i
int n
Folder f
for i in parent do {
f = folder(i)
for (n=0; n<level; n++) outfile << "| "
outfile << (uniqueID i) " " (name i) ""
if (!null f) {
outfile << "/\n"
listIndices(f,level+1)
}
else {
outfile << "\n"
}
}
}
if (null outfile) print "Failed to open " filename "\n"
else listIndices(folder topfoldername, 0)
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
---|
Was this topic helpful?
Document Information
Modified date:
01 May 2020
UID
swg21404740