It's all about the answers!

Ask a question

DXL script to find object ID in any given folder in Rational Doors


Sneha B (13310) | asked Jul 14 '20, 9:26 a.m.

 I'm new to the DXL scripting and was trying to write a script to find object id in the given folder path. That means, user will provide the object id which he/she wants to find in Doors. I tried to use built in option in Doors (Tools -> Find) in order to find any object id in the given folder path but it didn't work. Please help me if you need more about this option or provide me the DXL script sample.


Thanks!

One answer



permanent link
Ashok Anumula (11) | answered Oct 01 '20, 8:17 a.m.

 


Folder f = current //Run the script in folder where you want find object ID
Item itm
Object ob
string Object_ID = "323" //Give object ID here which you want to find
Module m
string FullModName
for itm in f do
{
if(type(itm)=="Formal")
{
//FullModName = fullName itm
m = read(fullName(itm), false)

for ob in m do
{
if(ob."Absolute Number""" == Object_ID)
{
print "Object ID "  ob."Absolute Number" " found in module: ", print fullName(m)"\n"
}
}
}
}

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.