Ibm doors 如何使用DXL显示门中选定标高的选定属性?

Ibm doors 如何使用DXL显示门中选定标高的选定属性?,ibm-doors,ibm-rational,Ibm Doors,Ibm Rational,我正在寻找一些DXL/DOORS帮助 我有3个模块:A、B和C。B链接到A,C链接到B。所以B是深度1,C是深度2。我试图在a中创建一列,显示B和C中已内联对象的对象文本、模块名称和对象编号。但是,我不想显示所有3个(文本、名称、编号)对于B和C——相反,我只想显示B中的对象文本以及C中的模块名称和对象编号。理想情况下,我希望C中的信息紧跟在B中的信息之后放在方括号中。我希望它看起来像这样: 在列表中的列中: “来自B的对象文本”[“C的模块名称”“C的对象编号”] 我使用向导创建了下面的布局D

我正在寻找一些DXL/DOORS帮助

我有3个模块:A、B和C。B链接到A,C链接到B。所以B是深度1,C是深度2。我试图在a中创建一列,显示B和C中已内联对象的对象文本、模块名称和对象编号。但是,我不想显示所有3个(文本、名称、编号)对于B和C——相反,我只想显示B中的对象文本以及C中的模块名称和对象编号。理想情况下,我希望C中的信息紧跟在B中的信息之后放在方括号中。我希望它看起来像这样:

在列表中的列中: “来自B的对象文本”[“C的模块名称”“C的对象编号”]

我使用向导创建了下面的布局DXL脚本,但目前它显示了B和C的所有3条信息。对于如何从B(深度1)打印对象文本,然后从C(深度2)打印模块名称和对象编号,有人有什么建议吗

注意:在下面的脚本中,我调整了端点,以按我希望的顺序显示s、p和t

// DXL generated by DOORS traceability wizard on 27 October 2014.
// Wizard version 2.0, DOORS version 9.5.2.1
pragma runLim, 0
const int indentStep = 360
Buffer indentBuff = create
Buffer lineBuff = create
lineBuff = "______________________"
string indentAllParagraphs(string s, bool addBullets, int addedIndent)
{
    int numParas = 0
    RichTextParagraph rtp
    indentBuff = s
    for rtp in s do
    {
        numParas++
        Buffer t = create()
        t += rtp.text
        if (length(t) > 0 )
        {
            bool hasBullet = rtp.isBullet
            int  indentLev = rtp.indentLevel
            indentBuff = applyTextFormattingToParagraph(indentBuff, hasBullet, indentLev+addedIndent, numParas)
        }
        delete(t)
    }
    return (numParas == 0 ? "" : tempStringOf(indentBuff))
}
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 = false
    string linkModName = "*"
    for lr in all(o<-linkModName) do {
        otherMod = module (sourceVersion lr)
        if (!null otherMod) {
            if ((!isDeleted 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(otherVersion,false)
        }
        othero = source l
        if (null othero) continue
        if (isDeleted othero) continue
        int oldLines = lines[depth-1]
        doneOne = true
        {
            s = name(otherMod)
            p = probeRichAttr_(othero,"Object Number", false)
            t = probeRichAttr_(othero,"Object Text", false)
            displayRich(t" ""["s" "p"]")
        }
        lines[depth-1] += 3
        if ( depth < 2 ) {
            showIn(othero, depth+1)
        }
    }
}
showIn(obj,1)
delete indentBuff
delete lineBuff
//DOORS可追溯性向导于2014年10月27日生成的DXL。
//向导版本2.0,DOORS版本9.5.2.1
布拉格语,0
const int indentStep=360
缓冲区缩进buff=创建
缓冲区lineBuff=创建
lineBuff=“\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
字符串缩进所有段落(字符串s、布尔添加项目符号、整数添加项目符号)
{
int numParas=0
RichTextRTP
缩进buff=s
对于s do中的rtp
{
努帕拉斯++
缓冲区t=create()
t+=rtp.text
如果(长度(t)>0)
{
bool hasbill=rtp.isBullet
int indentLev=rtp.indentLevel
indentBuff=applyTextFormattingToParagraph(indentBuff、hasbill、indentLev+addedIndent、numParas)
}
删除(t)
}
返回值(numParas==0?“:tempStringOf(indentBuff))
}
整数行[2]={0,0}
空隙调整线(内部深度、显示深度){
整数计数
用于(计数=0;计数<2;计数++){
while(行[depth-1]<行[count]){
如果(深度==showAtDepth)displayRich(\\pard“”)
线条[深度-1]++
}
}
}
无效显示(对象o,整数深度){
链路l
链接参考lr
ModName_uu; otherMod=null
模块linkMod=null
ModuleVersion otherVersion=null
对象其他
字符串disp=null
字符串s=null
纯字符串
整数明文
整数计数
bool doneOne=false
字符串linkModName=“*”

对于所有的lr(o以下是我的方法:

在模块B中: 创建一个DXL属性,用于从模块C中提取所需的信息,例如,一个名为“C对象信息”的属性,用于收集模块名称和对象编号。(我通常通过“分析”>“向导”执行此操作,然后使用“工具”>“支持工具”>“将布局DXL转换为属性DXL,然后调整DXL)。因此,模块B中具有模块C的in链接的每个对象将具有可在模块A中访问的属性“C对象信息”

在模块A中: 创建一个DXL布局(通过分析>向导),从模块B“对象文本[C对象信息]”中提取并格式化所需的信息

[我不知道这样做是否是DOORS的好做法,但它使脚本编写变得更容易。当我知道我将在链接层次结构的多个级别上获取诸如“[Object ID]Object Text”之类的大块信息时(例如,从模块A customerRequirement到模块B systemRequirement再到模块C subsystemRequirement,我的systemRequirement模块中的customerRequirement和subsystemRequirement都有一个DXL属性,这样我就可以从多个链接级别访问/显示/操作数据。这对于可追溯性报告、开发ng验证/确认程序等]