It's all about the answers!

Ask a question

How to display immediate heading name of a target or linked object with dxl


Naidu Kannuru (1111) | asked Apr 10 '17, 7:42 a.m.
edited Apr 10 '17, 8:39 a.m. by Ralph Schoon (63.5k33646)

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
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"
}

Please help me in displaying immediate object heading of linked object.

Regards,

Naidu.

2 answers



permanent link
Ashok Anumula (11) | answered Oct 05 '20, 7:02 a.m.
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"
}
}

permanent link
Ashok Anumula (11) | answered Oct 05 '20, 7:06 a.m.

 //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


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.