如何在DOORS中一次删除多行?

时间:2019-02-20 17:50:46

标签: ibm-doors

背景

我正在修剪DOORS文件中过时的信息行。我知道如何删除行的方法是通过以下过程一次一次删除它们:

  1. 选择我要删除的行
  2. 打开表格菜单
  3. 跳过删除选项
  4. 点击选项
  5. 每行重复一次。

问题

是否可以在DOORS中一次批量删除多行?

1 个答案:

答案 0 :(得分:0)

所以-这比看上去有些棘手,主要是因为DOORS不允许在没有DXL脚本的情况下非顺序地选择项目。

如果我这样做,我将执行以下操作:

首先,将要删除的每一行的第一个元素设置为可识别的内容,例如“ || DELETED ||”

接下来,我将运行以下代码:

// Use the current module
Module m = current
// Grab the first object
Object o = first ( m )
// Loop through the objects in the module - using a deletion in the loop, so no for o in m
while ( !null o ) {
    // Check for our deletion flag
    if ( o."Object Text" "" == "||DELETED||" ) {
        // Grab the parent object - this will actually be the 'row object'
        Object oP = parent ( o )
        // Set 'o' to point to the object right before the deletion (to allow loop to continue)
        o = previous ( parent ( o ) )
        // Softdelete that row object
        softDelete ( oP )
    }
    // Go to the next object (on the last object, will set equal to null)
    o = next ( o )
}

这可能不是解决此问题的最佳方法-我一直想在GUI中进行非顺序选择。但是它应该可以完成您想要做的事情。