I am a DXL newbie and am trying to use layout DXL in Module_X to display a text output based on the the value of a linked attribute in Module_Y.
Module_X has multiple out-links, one of which it is Module_Y. The attribute I want to read from Module_Y is called Version_number and is a range of enumerations from "Version 1" to "Version 6".
If the linked version is greater than Version 3 then I would like to output a 'Yes' text string in the layout DXL that this run in within Module_X. Each object in Module_X may have more than one linked version_number. There are 5 hops in total between Module_X and Module_Y.
I have attempted to do this via the Analysis Wizard to display the linked version_number attribute, which is successful. However I am unsure how to approach the "if the value of version_number contains > Version_3" element. Any help appreciated, please let me know if I need to break this question down a bit.
void showOut(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
string linkModName = "*"
for l in all(o->linkModName) do {
otherVersion = targetVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
if (!equal(getItem otherMod, (itemFromID limitModules[depth-1]))) continue
if (versionString(otherVersion) != limitVersions[depth-1]) continue
othero = target l
if (null othero) {
load(otherVersion,false)
}
othero = target l
if (null othero) continue
if (isDeleted othero) continue
int oldLines = lines[depth-1]
adjustLines(depth, 4)
bool kick = (doneOne) && (lines[depth-1] == oldLines)
if (kick) {
lines[depth-1]++
if (depth == 4) displayRich("\\pard " " ")
}
if (depth < 4) {
showOut(othero, depth+1)
}
doneOne = true
if (depth == 4) {
s = probeRichAttr_(othero,"Version_number", false)
if (s == "")
displayRich("\\pard " " ")
else
displayRich("\\pard " s)
}
lines[depth-1] += 1
}
} showOut(obj,1)
s = probeRichAttr_(othero,"Version_number", false)
if (s == "")
displayRich("\\pard " " ")
elseif(intOf(s[8])>3)
displayRich("\\pard " s)