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")
Methods
- Sub CopyTagGroup( iTagGroup, ioTagGroup)
-
Copies a TagGroup to a new Product
- Parameters:
-
- iTagGroup
- TagGroup to be copied. dd>
- ioTagGroup
- The TagGroup to which iTagGroup gets copied dd>
- 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)
- Sub CreateTagGroup( iTagGroupName, iModifyReference, iProduct, 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. dd>
- iModifyReference
- Modify reference or modify locally. dd>
- iProduct
- Reference product. dd>
- oTagGroup
- Created TagGroup. dd>
- 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
- Sub CreateTagGroupInDoc( iTagGroupName, oTagGroup)
-
Creates a TagGroup with the given name in the document.
- Parameters:
-
- iTagGroupName
- Name of the TagGroup to be created. dd>
- oTagGroup
- Created TagGroup. dd>
- 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
- Sub DeleteTagGroup( iTagGroup)
-
Deletes a TagGroup
- Parameters:
-
- iTagGroup
- TagGroup to be deleted dd>
- 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)
- Sub ReparentTagGroup( iTagGroup, ioProduct, iModifyReference)
-
Reparents a TagGroup
- Parameters:
-
- iTagGroup
- TagGroup to be reparented. dd>
- ioProduct
- The Product to which the TagGroup gets reparented dd>
- iModifyReference
- Modify reference or modify locally. dd>
- 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