Attribute DXL to Display Outgoing Traces

This Attribute DXL displays the identifiers of target objects that are linked to via a link module called “satisfies”. This code is generic and can be used to display any relationship by changing the link module name.
The link module name is unqualified to allow the use of multiple link modules with the same name.

//	Satisfies

/*
	Display parents to which the current requirement is linked via outgoing "satisfies" links.

	Tony Goodman
*/

pragma runLim, 0

Buffer bsz = create

Link l = null
ModName_ otherMod = null
Object othero = null
bool doneOne = false

string LM = "satisfies"

for l in all (obj -> "*") do
{
	if (name(module l) != LM) continue

	ModuleVersion otherVersion = targetVersion(l)

	otherMod = module(otherVersion)
	if (null otherMod || isDeleted otherMod) continue
	othero = target l
	if (null othero)
	{
		load(otherVersion,false)
	}
	othero = target 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)