Show linked object with DXL
Hello,
suppose that you have two formal modules like the ones below
Man module
ID Object Heading
1 Tom (has an incoming link FROM Eleonor)
2 Paul (has an incoming link FROM Sasha and Margaret)
Girl module
ID Object Heading
1 Eleonor (has an outgoing link TO Tom)
2 Sasha (has an outgoing link to Paul)
3 Margaret (has an outgoing link to Paul)
I would like to print with a DXL script the couple "pointed object and pointing object" such as:
Tom, Eleonor
Paul, Sasha
Paul, Margaret
I've tried out with side1 and side2 commands of the linkset object, but I can
display only the first row:
Tom, Eleonor
How can I print all the rows?
Thank you in advance.
Domenico
suppose that you have two formal modules like the ones below
Man module
ID Object Heading
1 Tom (has an incoming link FROM Eleonor)
2 Paul (has an incoming link FROM Sasha and Margaret)
Girl module
ID Object Heading
1 Eleonor (has an outgoing link TO Tom)
2 Sasha (has an outgoing link to Paul)
3 Margaret (has an outgoing link to Paul)
I would like to print with a DXL script the couple "pointed object and pointing object" such as:
Tom, Eleonor
Paul, Sasha
Paul, Margaret
I've tried out with side1 and side2 commands of the linkset object, but I can
display only the first row:
Tom, Eleonor
How can I print all the rows?
Thank you in advance.
Domenico
One answer
Hi Domenico,
If you are using DOORS 9.x, I would suggest to loop through the objects and then to the links in the objects themselves. It would be easier to run the DXL from the Girl module, looking at the outgoing links.
The script would be like this:
Object o, targetobj
Module targetmod, mod = current
Link lnk
string s1, s2
for o in mod do
{for lnk in o -> "*" do
{
s1 = o."Object Heading"
targetmod = read (target lnk, false) // open the targeted module to allow reading of targeted object
targetobj = target lnk
s2 = targetobj."Object Heading"
print s1 " , " s2 "\n"
close targetmod // close the previously opened module
}
}
This should obviously be adapted to you needs
If you are using DOORS 9.x, I would suggest to loop through the objects and then to the links in the objects themselves. It would be easier to run the DXL from the Girl module, looking at the outgoing links.
The script would be like this:
Object o, targetobj
Module targetmod, mod = current
Link lnk
string s1, s2
for o in mod do
{for lnk in o -> "*" do
{
s1 = o."Object Heading"
targetmod = read (target lnk, false) // open the targeted module to allow reading of targeted object
targetobj = target lnk
s2 = targetobj."Object Heading"
print s1 " , " s2 "\n"
close targetmod // close the previously opened module
}
}
This should obviously be adapted to you needs
Comments
Douglas Bush
FORUM MODERATOR / JAZZ DEVELOPER Jul 07 '13, 5:13 p.m.Hi Domenico,
I assume from the tag that you are attempting to use DXL with DOORS Next Generation. Although DXL is a powerful interface for use with Rational DOORS 9.x, my understanding is that DXL is not supported with DNG.
If you are work with DXL and DOORS 9.x, the DXL manual is available here:
The Rational DOORS Forum on developerWorks might also help: