2013-10-15 113 views

回答

0

不在GUI中,您必須編寫腳本。

標籤存儲在元素的TaggedValues集合中。當您刪除條目時,會有一個提示向後遍歷集合。

+0

你是什麼意思向後遍歷和什麼樣的腳本? – PeanutsMonkey

2

由於Uffe指出的那樣,你可以用一個腳本來完成。有關EA腳本的更多信息,請參閱the EA User Guide here

此處作爲一例是通過刪除名稱標籤的所有實例的單個元素上的VBScript中的一個功能:

function deleteTaggedValueForElement(theElement, theTagName) 

    dim i 
    if not theElement is nothing and Len(theTagName) > 0 then 
     dim tags as EA.Collection 
     set tags = theElement.TaggedValues 

     for i = tags.Count - 1 to 0 step -1 
      dim theTag as EA.TaggedValue 
      set theTag = tags.GetAt(i) 
      if theTag.Name = theTagName then 
       call theElement.TaggedValues.DeleteAt(i, FALSE) 
      end if 
     next 
    end if 

end function 

sub main 
    dim theTagName 
    dim theQuery 
    dim theElements as EA.Collection 

    theTagName = "MyTag" 
    theQuery= "SELECT t_object.Object_ID FROM t_objectproperties INNER JOIN t_object ON t_objectproperties.Object_ID = t_object.Object_ID WHERE t_objectproperties.Property='" & theTagName & "'" 
    set theElements = Repository.GetElementSet(theQuery, 2) 

    dim theElement 
    for each theElement in theElements 
     call deleteTaggedValueForElement(theElement, theTagName) 
    next 

end sub 

main 
相關問題