It's all about the answers!

Ask a question

How to get all link objects of link module in DOORS DXL without doing any loops on source or destination modules


kulbhushan patil (11) | asked Jun 18, 9:04 a.m.
I am looking to get all link objects that are stored in link moule.
Link module has linksets. But linkset doesn't store actual link object which can be read/loaded without iterating the source module of the linkset. 
Can anyone tell me how to get link object directly without iterating the source or destination modules ?

Below is my code that is current taking huge time for reading the link objects. I am looking for optimized way of reading the link objects of link module using DXL code.

Object obj = null;
Module pModule = null;
string srcModPath = "";
string tgtModPath = "";
Module srcModule = null;
Module tgtModule = null;
string srcModName = "";
string srcModuleId = "";
string srcModPath = "";
string tgtModPath = "";
string linkModPath = "";
ModuleVersion modVersion = null


for obj in pModule do
{
// get names of source and target modules
srcModPath = obj."source" "";
tgtModPath = obj."target" "";
string SourceIndex = obj."Source Index";
// read the source module
srcModule = read(srcModPath, false);
tgtModule = read(tgtModPath, false);
srcModName = srcModule."Name";
srcModuleId = qualifiedUniqueID(srcModule);
for obj in all(srcModule) do
{
for link in all(obj->linkModPath) do
{
// check for target module for matching name
modVersion = targetVersion(link);
if (fullName(modVersion) == tgtModPath)
{
//Here is my code which converts link object to Skip structure
}
}
}
    } 

One answer



permanent link
stuart green (661) | answered Jun 20, 10:12 a.m.

Links are not stored in link modules, they are stored in source and target formal modules. So opening source or target cannot be avoided.

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.