【问题标题】:How do I make a DOORS DXL attribute based on the value of another attribute?如何根据另一个属性的值创建 DOORS DXL 属性?
【发布时间】:2014-05-14 18:38:53
【问题描述】:

X 和 Requirement 是现有属性。

我想创建一个属性 Z,对于给定的对象, 如果Requirement=True,那么Z={属性X的值}, 但如果 R​​equirement=False,则 Z={Object Heading and Object Text}。

制作这个属性的 DXL 是什么? 谢谢。

【问题讨论】:

    标签: scripting ibm-doors


    【解决方案1】:
    This is untested code but try something like this: (assuming attribute z exists as text)
    
    Module m = current
    Object o
    
    
    for o in m do
    {
       if ((o."Requirement") == "true")
       {
           o."z" = o."x" ""
       }
       else   // requirement = false
       {
           o."z" = o."Object Heading" "\n" o."Object Text" ""
    
       }
    }
    

    【讨论】:

      猜你喜欢
      • 2021-12-18
      • 1970-01-01
      • 2020-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多