2017-10-07 8 views
0

私は以下のdxlコードのスナップを持っています F3がオンのフィルターでオブジェクトIDをコピーしたいと思います。 : 私は何を間違えているのか分かりません。それはすべてのオブジェクトの私(ID)を与えます。Doors DXLフィルター

string Id 
int x=0; 
int y=0; 
Id = o."SourceID" 

Filter f0 = hasNoLinks(linkFilterIncoming, "*") 
Filter f1=attribute "_TraceTo" == "System" 
Filter f2 = attribute "Object Type" == "requirement" 
Filter f3 = f1&&f2&&f0 
addFilter(m,f3,x,y) 
print x ":\t" fullName(module(m)) "\n" 
wOutKLHUntraced << Id "\t" fullName(module(m)) "\n" 

答えて

1

まず、あなたは、フィルタが適用されるように、フィルタを追加した後の文filtering onを追加する必要があります。次に、フィルタリングされたオブジェクトのみが表示されます。

次に、「Id」をスクリプトの早い時期に設定します。 4行目で "o"が オブジェクトに設定されていますが、私はどちらが1つであるかはわかりませんが、確かに の結果ではありません。私は約30モジュールのループのためにこのスクリプトを実行しているよう: 私はどこか間違ってフィルタを設定アム代わりに、文のfiltering on後、マイスクリプトが良い実行しているが、異なる結果が得られている

Object o = first m // the first object that is now visible 
Id = o."SourceID" 
+0

Thanks Mike、Filtering on、 – user3285192

+0

こんにちは、私のスクリプトは正常に実行されていますが、常に5つの異なる結果:私はこのスクリプトを約30モジュールのforループで実行しています: – user3285192

0

文を追加?

Stream TbdUntraced; 
    string s 
     string d 
     Object o 
     string trac 
     int numReqs = 0; 


     string IdNum 
     string untraced 


     int x=0; 
     int y=0; 
     int a =0; 


     for o in m do 
     { 
     ensureInLinkedModulesLoaded(o,S_SATISFIES); 
     s = o."Object Type" 


     string Id 
     string Topic 
     Topic = o."_Topic" 

      numReqs++; 




       Filter f0 = hasNoLinks(linkFilterIncoming, "*") 
       Filter f1 = contains(attribute "_TraceTo", "TBD", false)    
       Filter f2 = attribute "Object Type" == "requirement" 
       Filter f3 = attribute "MMS5-Autoliv_Supplier_Status" == "agreed" 
       Filter f4 = attribute "MMS5-Autoliv_Supplier_Status" == "partly agreed" 
       Filter f7 = f0&&f2&&(f3||f4)&&f1 
       addFilter(m,f7,x,y) 
       filtering on 
       d = o."MMS5-Autoliv_OEM_Status" 
       Id = o."SourceID" 
       Topic = o."_Topic"    
       print x ":\t" name(module(m)) "\n" 
       TbdUntraced << Id "\t" Topic "\t"name(module(m)) "\n" 

     } 
関連する問題