I am new to DXL and hoping for assistance. I found a DXL attribute script on the SMART DXL site that will return the Object Identifier (or other attribute if specified) by following the in-link of a specified Link Module. However, in addition to the Link Module, I also need to specify the value of an attribute (Program Allocation) and only return the values for the in-links that match both the Link Module Name and the Program Allocation value. Any assistance would be greatly appreciated.
Following is the DXL code that I was able to find on the SMART DXL site here
Attribute DXL to Display Incoming Traces// Satisfied By
/*
Display child requirements that are linked to the current requirement via "satisfies" links.
Tony Goodman
*/
pragma runLim, 0
Buffer bsz = create
Link l = null
LinkRef lr = null
ModName_ otherMod = null
Object othero = null
bool doneOne = false
string LM = "satisfies"
for lr in all(obj<-"*") do
{
if (name(module lr) != LM) continue
ModuleVersion mvSource = sourceVersion(lr)
otherMod = module(mvSource)
if (!null otherMod)
{
if ((!isDeleted otherMod) && (null data(mvSource)))
{
load((mvSource), false)
}
}
delete(mvSource)
}
for l in all(obj<-"*") do
{
if (name(module l) != LM) continue
ModuleVersion 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 (doneOne)
{
bsz += "\n"
}
bsz += identifier(othero)
// to display a different attribute, un-comment the following line and replace <attr-name> with your attribute name.
//bsz += probeAttr_(othero, "<attr-name>")
doneOne = true
delete(otherVersion)
}
obj.attrDXLName = tempStringOf(bsz)
delete(bsz)
------------------------------
Douglas Christian
------------------------------
#Sustainability#Engineering