I have inherited a problematic requirements tree, and need to do some quick and dirty work to make it presentable.
I have 1 high-level module with in-links from 4 modules at depth 1, but only 3 modules at depth 2. I’ve used the Analysis Wizard to create a DXL attribute which shows a specific set of attributes of all objects at depth 2, but for the sake of presentation I want to restrict this to a single depth 2 module (then create 2 other DXL attributes for the other 2 modules). I’ve copied the DXL below (hand copy, so there may be a typo here or there).
How do I alter this DXL to only pull data fro a specific module?
pragma runLim, 0
int lines[2] = {0, 0}
void adjustLines(int depth, showAtDepth) {
int count
for (count = 0; count < 2; count++) {
while (lines[depth-1]<lines[count]) {
if (depth = showAtDepth) displayRich("\pard " " ")
lines[depth-1]++
}
}
}
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 = flase
string linkModName = "*"
for lr in all(o<-linkModName) do {
otherMod = module (sourceVersion lr)
if (!null otherMod) {
if ((!isDelected 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(otherVerion,false)
}
othero = source l
if (null othero) continue
if (isDeleted othero) continue
int oldLines = lines[depth-1]
adjustLines(depth, 2)
bool kick = (doneOne) && (line[depth-1] == oldLines)
if (kick) {
lines[depth-1]++
if (depth ==2) displayRich("\pard " " ")
}
id (depth < 2) {
showIn(othero, depth+1)
}
doneOne = true
if (depth == 2) {
s = (identifier othero)
if (s == "")
displayRich("\pard " " ")
else
displayRich("\pard " s)
s = probeRichAttr_(othero, "User-Defined Attribute", false)
if (s == "")
displayRich("\pard " " ")
else
displayRich("\pard " s)
}
line[depth-1] += 4
}
}
showIn(obj, 1)
I don’t know the first thing about DXL, so the only thing I’ve change was to alter the attribute(s) that got pulled from the depth 2 modules. Trying to change the ModName_otherMod to equal “Name of target module” through an error when I checked it.