All Frameworks  Object Hierarchy  This Framework  Previous  Next  Indexes  

TagGroupFactory (Object)

IUnknown
  |
  +---IDispatch
    |
    +---CATBaseUnknown
      |
      +---CATBaseDispatch
        |
        +---AnyObject
          |
          +---TagGroupFactory
 


Interface representing TagGroup factory.

Role: This allows the creation of a TagGroup
The following code snippet can be used to obtain a TagGroupFactory from a selected Product
  Set ParentObject = CATIA.ActiveDocument.Selection.FindObject("CATIAProduct")	
  Set objTagGroupFact = ParentObject.GetTechnologicalObject("TagGroupFactory")
 

Method Index

CopyTagGroup
Copies a TagGroup to a new Product
CreateTagGroup
Creates a TagGroup.
CreateTagGroupInDoc
Creates a TagGroup with the given name in the document.
DeleteTagGroup
Deletes a TagGroup
ReparentTagGroup
Reparents a TagGroup

Methods


o Sub CopyTagGroup(DELMIATagGroup iTagGroup,
DELMIATagGroup ioTagGroup)
Copies a TagGroup to a new Product
Parameters:
iTagGroup
TagGroup to be copied.
ioTagGroup
The TagGroup to which iTagGroup gets copied
Returns:
an HRESULT value.
Legal values:
  • S_OK if the operation succeeds
  • E_FAIL otherwise
  • .
Example:
  ...
  Dim objTagGroup(2) As TagGroup
  Dim objTagGroupFactory as TagGroupFactory
  ...
  objTagGroupFactory.CopyTagGroup objTagGroup(1), objTagGroup(2)
o Sub CreateTagGroup(CATBSTR iTagGroupName,
boolean iModifyReference,
CATIAProduct iProduct,
DELMIATagGroup oTagGroup)
Creates a TagGroup. Each TagGroup has a Name, an option to modify reference or modify locally and, the reference product.
Parameters:
iTagGroupName
Name of the TagGroup to be created.
iModifyReference
Modify reference or modify locally.
iProduct
Reference product.
oTagGroup
Created TagGroup.
Returns:
An HRESULT.
Legal values:
S_OK
Action is successfully created and the interface pointer is successfully returned
E_FAIL
Action was successfully created, but the interface query failed
E_NOINTERFACE
Action was successfully created, but the it doesn't implement the requested interface
E_OUTOFMEMORY
The component allocation failed
Example:
   Set ParentObject = CATIA.ActiveDocument.Selection.FindObject("CATIAProduct")	
   Set objTagGroupFact = ParentObject.GetTechnologicalObject("TagGroupFactory")

   Dim objTagGroup As TagGroup
   Dim ModifyRef As Boolean

   ModifyRef = FALSE
   objTagGroupFact.CreateTagGroup "My_Group", ModifyRef, ParentObject, objTagGroup
   
o Sub CreateTagGroupInDoc(CATBSTR iTagGroupName,
DELMIATagGroup oTagGroup)
Creates a TagGroup with the given name in the document.
Parameters:
iTagGroupName
Name of the TagGroup to be created.
oTagGroup
Created TagGroup.
Returns:
An HRESULT.
Legal values:
S_OK
Action is successfully created and the interface pointer is successfully returned
E_FAIL
Action was successfully created, but the interface query failed
E_NOINTERFACE
Action was successfully created, but the it doesn't implement the requested interface
E_OUTOFMEMORY
The component allocation failed
Example:
   Set ParentObject = CATIA.ActiveDocument	
   Dim Fact As TagGroupFactory
   Set Fact = ParentObject.GetItem("DELMTagGroupFactory")
   Dim TagGrp As TagGroup
   Fact.CreateTagGroupInDoc "ABC", TagGrp
   
o Sub DeleteTagGroup(DELMIATagGroup iTagGroup)
Deletes a TagGroup
Parameters:
iTagGroup
TagGroup to be deleted
Returns:
an HRESULT value.
Legal values:
  • S_OK if the operation succeeds
  • E_FAIL otherwise
  • .
Example:
  ...
  Dim objTagGroup(2) As TagGroup
  Dim objTagGroupFactory as TagGroupFactory
  ...
  objTagGroupFactory.DeleteTagGroup objTagGroup(1)
  
o Sub ReparentTagGroup(DELMIATagGroup iTagGroup,
CATIAProduct ioProduct,
boolean iModifyReference)
Reparents a TagGroup
Parameters:
iTagGroup
TagGroup to be reparented.
ioProduct
The Product to which the TagGroup gets reparented
iModifyReference
Modify reference or modify locally.
Returns:
an HRESULT value.
Legal values:
  • S_OK if the operation succeeds
  • E_FAIL otherwise
  • .
Example:
  ...
  Dim objTagGroup(2) As TagGroup
  Dim objTagGroupFactory as TagGroupFactory
  Dim objProd As Product
  ...
  objTagGroupFactory.ReparentTagGroup objTagGroup(0), objProd, TRUE

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