Role: This interface is used to work with TagGroup which consists of a list of Tags.
The following code snippet can be used to obtain a TagGroup from a selected Product
Set ParentObject = CATIA.ActiveDocument.Selection.FindObject("CATIAProduct")
Set objTagGroup = ParentObject.GetTechnologicalObject("TagGroup")
Methods
- Sub CreateTag( ioTag)
-
Creates a Tag
- Parameters:
-
- oTag
- Newly created Tag. dd>
- Returns:
- an HRESULT value.
Legal values:- S_OK if the operation succeeds
- E_FAIL otherwise .
- Example:
-
Dim objTagGroup As TagGroup ... Dim objTag As Tag objTagGroup.CreateTag objTag
- Sub DeleteTag( iTag)
-
Deletes a Tag
- Parameters:
-
- ioTag
- Tag to be deleted dd>
- Returns:
- an HRESULT value.
Legal values:- S_OK if the operation succeeds
- E_FAIL otherwise .
- Example:
-
Dim objTagGroup As TagGroup ... Dim objTag As Tag objTagGroup.DeleteTag objTag
- Sub GetOwner( ioParentProduct)
-
Retrieves the name of the owner of this TagGroup.
- Parameters:
-
- ioParentProduct
- Name of the owner of this TagGroup. dd>
- Returns:
- an HRESULT value.
Legal values:- S_OK if the operation succeeds
- E_FAIL otherwise .
- Example:
-
Dim objTagGroup As TagGroup ... Dim ownerName As String objTagGroup.GetOwner ownerName
- Func GetTag( index) As
-
Returns a Tag by Index.
- Parameters:
-
- index
- Index of the required Tag. dd>
- oTag
- Returned Tag. dd>
- Returns:
- an HRESULT value.
Legal values:- S_OK if the operation succeeds
- E_FAIL otherwise .
- Example:
-
Dim objTagGroup As TagGroup ... For i = 1 To objTagGroup.Count Set objTag = objTagGroup.GetTag(i) ... Next
- Sub GetTagList( ioTagList)
-
Gets the List of names of Tags
- Parameters:
-
- ioTagList
- Underlying List of Tag names. dd>
- Returns:
- an HRESULT value.
Legal values:- S_OK if the operation succeeds
- E_FAIL otherwise .
- Example:
-
Dim objTagGroup As TagGroup ... Dim List(100) objTagGroup.GetTagList List