How to display immediate heading name of a target or linked object with dxl
Naidu Kannuru (11●1●1)
| asked Apr 10 '17, 7:42 a.m.
edited Apr 10 '17, 8:39 a.m. by Ralph Schoon (63.5k●3●36●46) This question is regarding DOORS 9.6.1. I have one module and the objects are in which have been linked to many other objects in many modules. now I want to display: 1. Link full path 2. Immediate heading name of target object or linked object 3. Target object text I am able to get link full path and object text with the below code but not able to display immediate heading of linked object:
Link lnk
Please help me in displaying immediate object heading of linked object.
Regards, Naidu. |
2 answers
Module m = current
Link lnk
Object obj
for obj in m do
{
for lnk in obj -> "*" do
{
string tmn = fullName target(lnk)
if(!open module tmn)
{
read(tmn, false)
}
Object trg = target lnk
string stext = trg."Object Text"
displayRich "\\b" tmn "\n"
display stext"\n" "\n"
while(trg."Object Heading"""==null)
{
trg = parent(trg)
}
print trg."Object Heading""""\n"
}
}
|
//Layout Dxl:
Link lnk
for lnk in obj -> "*" do
{
string tmn = fullName target(lnk)
if(!open module tmn)
{
read(tmn, false)
}
Object trg = target lnk
string stext = trg."Object Text"
displayRich "\b" tmn "\n"
display stext"\n" "\n"
while(trg."Object Heading"""==null)
{
trg = parent(trg)
}
display trg."Object Heading""""\n"
}
|
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.