All Frameworks  Object Hierarchy  This Framework  Indexes   

TCPTrace (Object)

Interface representing a TCP trace.

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

 


Property Index

TotalPoints
Returns the number of points in the trace.
TraceName
Manage the name of the trace.
Visibility
Manage the visibility of the trace.

Method Index

Export
Export the TCP trace data in a file.
GetAttachedOwner
Retrieves the default attached owner of the trace.
GetColor
Get the TCP trace component (DNBTCPTraceReps) color.
GetLegendsVisibility
Get the TCP trace component (DNBTCPTraceReps) legend visibility status.
GetThickness
Get the TCP trace component (DNBTCPTraceReps) thickness(for line, axis).
GetType
Get the TCP trace component (DNBTCPTraceReps) type.
GetVisibility
Get the TCP trace component (DNBTCPTraceReps) visibility status.
RefreshDisplay
Refresh display.
ResetAttachedOwner
Resets the attached owner of the trace to the world.
ResetGraphics
Reset the current appearance regarding the current general settings (not the one applied on the current object).
SetAttachedOwner
Sets the default attached owner of the trace.
SetColor
Set the TCP trace component (DNBTCPTraceReps) color.
SetLegendsVisibility
Get the TCP trace component (DNBTCPTraceReps) legend visibility status.
SetThickness
Set the TCP trace component (DNBTCPTraceReps) thickness(for line, axis).
SetType
Set the TCP trace component (DNBTCPTraceReps) type.
SetVisibility
Set the TCP trace component (DNBTCPTraceReps) visible (True) or hidden(False).

Properties


o Property TotalPoints() As (Read Only)
Returns the number of points in the trace.
Parameters:
oNbPoints
Long. Contains the number of points.
o Property TraceName() As
Manage the name of the trace. Property can be retrieved and valuated
Parameters:
oName
CATBSTR. String containing the retrieved name.
o 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.

Methods


o 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.
oError
Long. Output parameter. Indicates if any error happened.
o 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
o 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.
oR
Long. Red color component from 0 to 255. Input parameter.
oG
Long. Green color component from 0 to 255. Input parameter.
oB
Long. Blue color component from 0 to 255. Input parameter.
oA
Long. Alpha color component from 0 to 255. Input parameter.
o 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.
obVisible
Boolean. Indicates if it is visible(True) or hidden(False). Output parameter.
o 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.
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.
o Func GetType( iRep) As
Get the TCP trace component (DNBTCPTraceReps) type. For points, legal values are :
  1. 1 : CROSS
  2. 2 : PLUS
  3. 3 : CONCENTRIC
For line and axis, legal values are :
  1. 1 : solid
  2. 2 : dotted
  3. 3 : dashed
  4. 4 : dot-dashed
  5. 5 : phantom
Parameters:
iRep
DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter.
oType
Long. Depends on the DNBTCPTraceReps. Output parameter. Output parameter.
o 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.
obVisible
Boolean. True for visible and False for hidden. Output parameter.
o 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 RefreshDisplay to view the changes in the main viewer.
o 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.
o Sub ResetGraphics( bSetting)
Reset the current appearance regarding the current general settings (not the one applied on the current object). Call < to see the changes applied.
Parameters:
bSetting
Boolean. Indicates if it is visible(True) or hidden(False). Input parameter.
o 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.
o Sub SetColor( iRep,
iR,
iG,
iB,
iA)
Set the TCP trace component (DNBTCPTraceReps) color. Call < to see the changes applied.
Parameters:
iRep
DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter.
iR
Long. Red color component from 0 to 255. Input parameter.
iG
Long. Green color component from 0 to 255. Input parameter.
iB
Long. Blue color component from 0 to 255. Input parameter.
iA
Long. Alpha color component from 0 to 255. Input parameter.
o 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 < to see the changes applied.
Parameters:
iType
DNBTCPTraceLegends. Define the kind of legend on which the method will be applied on. Input parameter.
ibVisible
Boolean. Indicates if it is visible(True) or hidden(False). Input parameter.
o Sub SetThickness( iRep,
iThickness)
Set the TCP trace component (DNBTCPTraceReps) thickness(for line, axis). Call < to see the changes applied.
Parameters:
iRep
DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter.
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.
o Sub SetType( iRep,
iType)
Set the TCP trace component (DNBTCPTraceReps) type. For points, legal values are :
  1. 1 : CROSS
  2. 2 : PLUS
  3. 3 : CONCENTRIC
For line and axis, legal values are :
  1. 1 : solid
  2. 2 : dotted
  3. 3 : dashed
  4. 4 : dot-dashed
  5. 5 : phantom
Call < to see the changes applied.
Parameters:
iRep
DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter.
iType
Long.Depends on the DNBTCPTraceReps. Input parameter.
Returns:
HRESULT Returns S_OK if it succeeds, otherwise E_FAIL.
o Sub SetVisibility( iRep,
ibVisible)
Set the TCP trace component (DNBTCPTraceReps) visible (True) or hidden(False). Call < to see the changes applied.
Parameters:
iRep
DNBTCPTraceReps. Define the graphical object the method will be applied on. Input parameter.
ibActiv
Boolean. True for visible and False for hidden. Input parameter.

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