r1 TagGroup (Collection)
Indexes
TagGroup (Collection)
Interface representing a TagGroup.
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")
Method Index
CreateTag
Creates a Tag
DeleteTag
Deletes a Tag
GetOwner
Retrieves the name of the owner of this TagGroup.
GetTagList
Gets the List of names of Tags
GetTag
Returns a Tag by Index.
Methods
Creates a Tag
Parameters:
oTag
Newly created Tag.
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
Deletes a Tag
Parameters:
ioTag
Tag to be deleted
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
o Sub GetOwner ( ioParentProduct )
Retrieves the name of the owner of this TagGroup.
Parameters:
ioParentProduct
Name of the owner of this TagGroup.
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
o Sub GetTagList ( ioTagList )
Gets the List of names of Tags
Parameters:
ioTagList
Underlying List of Tag names.
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
Returns a Tag by Index.
Parameters:
index
Index of the required Tag.
oTag
Returned Tag.
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
Copyright © 2006, Dassault Systèmes. All rights reserved.