All Frameworks  Object Hierarchy  This Framework  Previous  Next  Indexes  

TagFactory (Object)

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


Interface representing Tag factory.

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

Method Index

CreateTag
Creates a Tag.

Methods


o Sub CreateTag(CATBSTR iTagName,
DELMIATag oTag)
Creates a Tag. Each Tag has a Name and a parent TagGroup.
Parameters:
iTagName
Name of the Tag to be created.
oTag
Newly created Tag.
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:
  Dim objTagFactory As TagFactory
  ...
  Dim objTag As Tag
  Dim TagName As String
  TagName =  "MY_TAG"
  objTagFactory.CreateTag TagName, objTag
  

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