Role: This interface is used to interact with an inverse kinematics device on which a TCP(Tool Center Point) has been defined.
A TCP trace is the graphical output of a task simulation. This output is the trajectory path generated by the TCP, defined by lines and points. Each point represents the location of the TCP at a given time.
The following code snippet can be used to obtain a handle from a product:
Dim MyRobot As Product
'retrieval of the product
...
'retrieval of the trace manager
Dim objDevice As TCPTraceManager
set objDevice = MyRobot.GetTechnologicalObject("TCPTraceManager")
'activate the trace
objDevice.TCPTraceMode=True
'Get the last path
Dim NbPath As Long
NbPath = objDevice.GetNbPath
If NbPath>0 Then
' retrieval of the last trace
Dim RobotTCPTrace As TCPTrace
Set RobotTCPTrace = objDevice.GetPath(NbPath)
'Export the trace points
RobotTCPTrace.Export("C:\TEMP\DEBUG.xls")
End If
Properties
- Property TotalPoints() As (Read Only)
-
Returns the number of points in the trace.
- Parameters:
-
- oNbPoints
- Long. Contains the number of points. dd>
- Property TraceName() As
-
Manage the name of the trace. Property can be retrieved and
valuated
- Parameters:
-
- oName
- CATBSTR. String containing the retrieved name. dd>
- Property Visibility() As
-
Manage the visibility of the trace. Property can be retrieved and
valuated
- 1: shown
- 0: hidden
- Parameters:
-
- oVisibility
- Boolean. Contains the return value. dd>
Methods
- Func Export( iName) As
-
Export the TCP trace data in a file. The file format is indicated by the
iFileName extension. Only Excel(Windows NT only) and text files
are supported. If there is already a file at the given location, the user
is prompted to override the file.
Example : iFileName = C:\TEMP\MyFile.xls -> Excel file iFileName = /usr/tmp/MyFile.txt -> Text file
- Parameters:
-
- iName
- CATBSTR. Input parameter. File path+name+extension. dd>
- oError
- Long. Output parameter. Indicates if any error happened. dd>
- Func GetAttachedOwner() As
-
Retrieves the default attached owner of the trace. By default, the
owner of the trace is the robot assembly node. If the robot is moved,
the trace will follow. However, in some scenarios, the trace might be
drawn related to another product (or even with respect to the world)
like for example when dealing with a workpiece positioner.
- Parameters:
-
- oOwner
- CATIABase. Attached owner of the trace. Output parameter. Returns nothing if the trace is defined related to the world dd>
- Sub GetColor( iRep, oR, oG, oB, oA)
-
Get the TCP trace component (DNBTCPTraceReps) color.
- Parameters:
-
- iRep
- DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter. dd>
- oR
- Long. Red color component from 0 to 255. Input parameter. dd>
- oG
- Long. Green color component from 0 to 255. Input parameter. dd>
- oB
- Long. Blue color component from 0 to 255. Input parameter. dd>
- oA
- Long. Alpha color component from 0 to 255. Input parameter. dd>
- Func GetLegendsVisibility( iType) As
-
Get the TCP trace component (DNBTCPTraceReps) legend visibility status.
Indicates whether or not at (pre)highlight, some text should be shown.
- Parameters:
-
- iType
- DNBTCPTraceLegends. Define the kind of legend on which the method will be applied on. Input parameter. dd>
- obVisible
- Boolean. Indicates if it is visible(True) or hidden(False). Output parameter. dd>
- Func GetThickness( iRep) As
-
Get the TCP trace component (DNBTCPTraceReps) thickness(for line, axis).
- Parameters:
-
- iRep
- DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter. dd>
- oThickness
- Indicates the index width of the line in the range [1,55]. This index is pointing on the true width in pixel, recorded in the standard (if there is one in the document) or in the setting. Input parameter. dd>
- Func GetType( iRep) As
-
Get the TCP trace component (DNBTCPTraceReps) type.
For points, legal values are :
- 1 : CROSS
- 2 : PLUS
- 3 : CONCENTRIC
- 1 : solid
- 2 : dotted
- 3 : dashed
- 4 : dot-dashed
- 5 : phantom
- Parameters:
-
- iRep
- DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter. dd>
- oType
- Long. Depends on the DNBTCPTraceReps. Output parameter. Output parameter. dd>
- Func GetVisibility( iRep) As
-
Get the TCP trace component (DNBTCPTraceReps) visibility status.
- Parameters:
-
- iRep
- DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter. dd>
- obVisible
- Boolean. True for visible and False for hidden. Output parameter. dd>
- Sub RefreshDisplay()
- Refresh display. Need to call this method whenever the graphic properties are changed. By default, when changing the graphic properties, the refresh is not applied for performance reasons. Caller of the API must call to view the changes in the main viewer.
- Sub ResetAttachedOwner()
-
Resets the attached owner of the trace to the world. When a new
trace will be created, it will defined with respect to the world.
Remark: this will not change the exported values. - Sub ResetGraphics( bSetting)
-
Reset the current appearance regarding the current general settings
(not the one applied on the current object).
Call RefreshDisplay to see the changes applied.
- Parameters:
-
- bSetting
- Boolean. Indicates if it is visible(True) or hidden(False). Input parameter. dd>
- Sub SetAttachedOwner( iOwner)
-
Sets the default attached owner of the trace. By default, the owner
of the trace is the robot. When a new trace is created, the attached
owner is used to set it upon the trace.
Remark: set the attached owner will not change the exported values.- Parameters:
-
- iOwner
- CATIABase. Attached owner of the trace. Input parameter. dd>
- Sub SetColor( iRep, iR, iG, iB, iA)
-
Set the TCP trace component (DNBTCPTraceReps) color.
Call RefreshDisplay to see the changes applied.
- Parameters:
-
- iRep
- DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter. dd>
- iR
- Long. Red color component from 0 to 255. Input parameter. dd>
- iG
- Long. Green color component from 0 to 255. Input parameter. dd>
- iB
- Long. Blue color component from 0 to 255. Input parameter. dd>
- iA
- Long. Alpha color component from 0 to 255. Input parameter. dd>
- Sub SetLegendsVisibility( iType, ibVisible)
-
Get the TCP trace component (DNBTCPTraceReps) legend visibility status.
Indicates whether or not at (pre)highlight, some text should be shown.
Call RefreshDisplay to see the changes applied.
- Parameters:
-
- iType
- DNBTCPTraceLegends. Define the kind of legend on which the method will be applied on. Input parameter. dd>
- ibVisible
- Boolean. Indicates if it is visible(True) or hidden(False). Input parameter. dd>
- Sub SetThickness( iRep, iThickness)
-
Set the TCP trace component (DNBTCPTraceReps) thickness(for line, axis).
Call RefreshDisplay to see the changes applied.
- Parameters:
-
- iRep
- DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter. dd>
- iThickness
- Indicates the index width of the line in the range [1,55]. This index is pointing on the true width in pixel, recorded in the standard (if there is one in the document) or in the setting. Input parameter. dd>
- Sub SetType( iRep, iType)
-
Set the TCP trace component (DNBTCPTraceReps) type.
For points, legal values are :
- 1 : CROSS
- 2 : PLUS
- 3 : CONCENTRIC
- 1 : solid
- 2 : dotted
- 3 : dashed
- 4 : dot-dashed
- 5 : phantom
- Parameters:
-
- iRep
- DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter. dd>
- iType
- Long.Depends on the DNBTCPTraceReps. Input parameter. dd>
- Returns:
- HRESULT Returns S_OK if it succeeds, otherwise E_FAIL. dd>
- Sub SetVisibility( iRep, ibVisible)
-
Set the TCP trace component (DNBTCPTraceReps) visible (True)
or hidden(False).
Call RefreshDisplay to see the changes applied.
- Parameters:
-
- iRep
- DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter. dd>
- ibActiv
- Boolean. True for visible and False for hidden. Input parameter. dd>