Hello everybody, |
Re: Traceability Wizard - Depth 2 You could try by choosing all modules, all link modules and in the step 4 select Display information only from selected modules and Multiple columns then choose Next and choose Module 2, Next and choose Module 3. In the resulting columns remove the column showing information from Module 2. The remaining column will show the information that has tracability between Module 1 and Module 3 via Module 2. NOTE Only objects in 3 that have links from the object to an object in 2 that inturn is linked to an object in 1 will show anything. |
Re: Traceability Wizard - Depth 2 Or if you want to be independent of the modules and want to follow links through the different link modules instead you could use this slightly modified layout dxl:
// DXL generated by DOORS traceability wizard on 05 November 2009.
// Wizard version 2.0, DOORS version 9.2.0.1
pragma runLim, 0
string lm[2] = {"4714938f437c34a5-00001821", "4714938f437c34a5-00001822"}
void showIn(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
Item linkModItem = itemFromID(lm[depth - 1])
if (null linkModItem) {
displayRich("\\pard " "<<Link module not found>>")
} else if (type(linkModItem) != "Link") {
displayRich("\\pard " "<<Invalid link module index for this database>>")
} else {
string linkModName = fullName(linkModItem)
for lr in all(o<-linkModName) do {
otherMod = module (sourceVersion lr)
if (!null otherMod) {
if ((!isDeleted otherMod) && (null data(sourceVersion lr))) {
load((sourceVersion lr),false)
}
}
}
for l in all(o<-linkModName) do {
otherVersion = sourceVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = source l
if (null othero) {
load(otherVersion,false)
}
othero = source l
if (null othero) continue
if (isDeleted othero) continue
if (depth < 2) {
showIn(othero, depth+1)
}
doneOne = true
if (depth == 2) {
s = probeRichAttr_(othero,"Object Text", false)
if (s == "")
displayRich("\\pard " " ")
else
displayRich("\\pard " s)
}
}
}
}
showIn(obj,1)
string lm[2] = {"4714938f437c34a5-00001821", "4714938f437c34a5-00001822"}
to your link modules id's. |
Re: Traceability Wizard - Depth 2 SystemAdmin - Thu Nov 05 08:49:55 EST 2009 Or if you want to be independent of the modules and want to follow links through the different link modules instead you could use this slightly modified layout dxl:
// DXL generated by DOORS traceability wizard on 05 November 2009.
// Wizard version 2.0, DOORS version 9.2.0.1
pragma runLim, 0
string lm[2] = {"4714938f437c34a5-00001821", "4714938f437c34a5-00001822"}
void showIn(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
Item linkModItem = itemFromID(lm[depth - 1])
if (null linkModItem) {
displayRich("\\pard " "<<Link module not found>>")
} else if (type(linkModItem) != "Link") {
displayRich("\\pard " "<<Invalid link module index for this database>>")
} else {
string linkModName = fullName(linkModItem)
for lr in all(o<-linkModName) do {
otherMod = module (sourceVersion lr)
if (!null otherMod) {
if ((!isDeleted otherMod) && (null data(sourceVersion lr))) {
load((sourceVersion lr),false)
}
}
}
for l in all(o<-linkModName) do {
otherVersion = sourceVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = source l
if (null othero) {
load(otherVersion,false)
}
othero = source l
if (null othero) continue
if (isDeleted othero) continue
if (depth < 2) {
showIn(othero, depth+1)
}
doneOne = true
if (depth == 2) {
s = probeRichAttr_(othero,"Object Text", false)
if (s == "")
displayRich("\\pard " " ")
else
displayRich("\\pard " s)
}
}
}
}
showIn(obj,1)
string lm[2] = {"4714938f437c34a5-00001821", "4714938f437c34a5-00001822"}
to your link modules id's. Module 1 outlinks to Object A in Module 2 through Linkset 1. Module 2 outlinks to Objects B - Z in Modules 3 - 99 through Linkset 2. In Module 1, I want to display the name information of Modules 3 - 99 (those modules that start links in Objects B - Z in Module 2 and end in objects in Modules 3 -99). I hope that explanation makes sense, I'm a little tripped up trying to describe the desired outcome. I've been trying to alter the code below but I'm hitting a wall. Any help would be appreciated. Thanks!! Sam |
Re: Traceability Wizard - Depth 2 Irons - Tue May 22 14:42:01 EDT 2012
I think you are saying you want the objects in M1 to simply list the Names of the modules 2 links away, using those link-modules. e.g. "Mod3, Mod22, Mod99". You don't want any object information?
Skip skpNames = createString() // KEY and DATA both 'string' base-name of linked module.
bla bla bla wizard code
if (depth == 2) then put(skpNames, NameOtherModule, NameOtherModule)
// don't display anything here.
bla bla bla
// Output:
Buffer bufResults = create()
for NameOther in skpNames do
{ if (length(bufResults) > 0) then bufResults += ", "
bufResults += NameOther
}
string Results = stringOf(bufResults)
delete(bufResults)
delete(skpNames)
display Results??
|