DNBIgpSetupInterfaces Tag (Object)
All Frameworks Object Hierarchy This Framework Previous Next Indexes
Tag (Object)
IUnknown
|
+---IDispatch
|
+---CATBaseUnknown
|
+---CATBaseDispatch
|
+---AnyObject
|
+---Tag
Interface representing a Tag.
Role: This interface is used to work with Tag.
The following code snippet can be used to obtain a Tag from a selected Product
Set ParentObject = CATIA.ActiveDocument.Selection.FindObject("CATIAProduct")
Set objTag = ParentObject.GetTechnologicalObject("Tag")
Method Index
-
GetName
- Retreives name of the Tag.
-
GetType
- Get Frame Type of the Tag by Name.
-
GetXYZ
- Gets the Position(X, Y, Z) of the Tag.
-
GetYPR
- Gets the Orientation (Y, P, R) of the Tag.
-
SetName
- Sets name of the Tag.
-
SetType
- Sets Frame Type of the Tag by Name.
-
SetXYZ
- Sets the Position(X, Y, Z) of the Tag.
-
SetYPR
- Sets the Orientation (Y, P, R) of the Tag.
Methods
-
Retreives name of the Tag.
- Parameters:
-
- oTagName
- Name of the Tag.
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
- Example:
-
Dim objTag As Tag
...
Dim Name as String
objTag.GetName Name
-
Get Frame Type of the Tag by Name.
- Parameters:
-
- oFrameName
- Name of the Required Frame.
Legal values : Returned tag frame by Name is either :
- Manufacturing,
-
- Design,
-
- Tool,
-
- Base,
-
- Custom
-
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
- Example:
-
Dim objTag As Tag
...
Dim FrameType as String
objTag.GetType FrameType
-
Gets the Position(X, Y, Z) of the Tag.
- Parameters:
-
- ioXYZ
- The underlying Tag position.
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
- Example:
-
Dim objTag As Tag
...
Dim List(3)
objTag.GetXYZ List
-
Gets the Orientation (Y, P, R) of the Tag.
- Parameters:
-
- ioYPR
- The underlying Tag orientation.
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
- Example:
-
Dim objTag As Tag
...
Dim List(3)
objTag.GetYPR List
-
Sets name of the Tag.
- Parameters:
-
- iTagName
- Name of the Tag.
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
- Example:
-
Dim objTag As Tag
...
objTag.SetName("My_Tag")
-
Sets Frame Type of the Tag by Name.
- Parameters:
-
- iFrameName
- Name of the Required Frame.
Legal values : Tag frame can be set by name to either :
- Manufacturing,
-
- Design,
-
- Tool,
-
- Base,
-
- Custom
-
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
- Example:
-
Dim objTag As Tag
...
objTag.SetType("Design")
o Sub SetXYZ( | double | iX, |
| double | iY, |
| double | iZ) |
-
Sets the Position(X, Y, Z) of the Tag.
- Parameters:
-
- iX
- The X value of the position
- iY
- The Y value of the position
- iZ
- The Z value of the position
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
- Example:
-
Dim objTag As Tag
...
objTag.SetXYZ 2800.0, 1800.0, 800.0
o Sub SetYPR( | double | iY, |
| double | iP, |
| double | iR) |
-
Sets the Orientation (Y, P, R) of the Tag.
- Parameters:
-
- iY
- The yaw value of the oreintation
- iP
- The pitch value of the orientation
- iR
- The roll value of the orientation
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
- Example:
-
Dim objTag As Tag
...
objTag.SetYPR 1.4, 0.5, 3.14
Copyright © 2003, Dassault Systèmes. All rights reserved.