Attribute DXL to Display Incoming Traces

This Attribute DXL displays the identifiers of source objects that are linked from 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.

//	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)


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


obj.attrDXLName = tempStringOf(bsz)