【发布时间】:2017-01-12 16:22:33
【问题描述】:
我正在编写一个 DXL 脚本来从所有对象中提取历史信息,并将一些历史参数写入 DOORS 模块中的其他属性(列)。我从 DXL 参考手册(修订版 9.6,靠近第 333 页)中的示例脚本开始,它只是将信息打印到 DXL 编辑器窗口中。我尝试添加一些代码来写入属性_Reviewer——见下文。编写的代码查看当前选定的对象,而不是当前h 历史所属的对象。传递给函数print 的最安全变量是什么,以便我可以访问所需的对象并写入其_Reviewer 属性?
// history DXL Example
/* from doors manual
Example history DXL program.
Generate a report of the current Module's
history.
*/
// print a brief report of the history record
// hs is a variable of type HistorySession
// module is a variable of type Module
void print(History h) {
HistoryType ht = h.type
print h.author "\t" h.date "\t" ht "\t"
//next 3 lines are the code I added to the manual's example
Buffer authortmp = create;
authortmp = h.author "\t" h.date "\t" ht "\t"
(current Object)."_Reviewer" = authortmp;
// other code from original deleted
}
// Main program
History h
print "All history\n\n"
for h in current Module do print h
print "\nHistory for current Object\n\n"
for h in current Object do print h
print "\nNon object history\n\n"
for h in top current Module do print h
【问题讨论】:
标签: ibm-doors