All Frameworks  Object Hierarchy  This Framework  Previous  Next  Indexes  

TagGroup (Collection)

IUnknown
  |
  +---IDispatch
    |
    +---CATBaseUnknown
      |
      +---CATBaseDispatch
        |
        +---Collection
          |
          +---TagGroup
 


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.
GetTag
Returns a Tag by Index.
GetTagList
Gets the List of names of Tags

Methods


o Sub CreateTag(DELMIATag ioTag)
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
  
o Sub DeleteTag(DELMIATag iTag)
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(CATBSTR 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 Func GetTag(short index) As DELMIATag
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
 
o Sub GetTagList(CATSafeArrayVariant 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 
  

Copyright © 2003, Dassault Systèmes. All rights reserved.