首页 > 解决方案 > 如何将一行从一个属性复制到 DOOR 中的另一个属性

问题描述

我正在尝试从 DOORS 一个属性中复制一行并将该行写入 DOORS 中的另一个属性。

标签: ibm-doors

解决方案


或多或少直接来自 DXL 手册

Object o = current // might be set in a loop

Regexp line = regexp2 ".*"
string sTextValue = o."Object Text"""

string sLastLine = ""
while (!null sTextValue && line sTextValue) {
    sLastLine = sTextValue[match 0]
    sTextValue = sTextValue [end 0 + 2:]
}
print "->" sLastLine "<-\n"
o."Other Attribute" = sLastLine

推荐阅读