pycatia.dnb_robot_interfaces.tcp_trace

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.dnb_robot_interfaces.tcp_trace.TCPTrace(com_object)

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
TCPTrace

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
export(i_name: str) int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func Export(CATBSTR iName) As long

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.
Parameters:

i_name (str) –

Return type:

int

get_attached_owner() AnyObject

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetAttachedOwner() As AnyObject

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
Return type:

AnyObject

get_colour() int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub GetColor(DNBTCPTraceReps iRep,
long oR,
long oG,
long oB,
long 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.
Returns:

enum dnbtcp_trace_reps

Return type:

int

get_legends_visibility(i_type: int) bool

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetLegendsVisibility(DNBTCPTraceLegends iType) As
boolean

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.
Parameters:

i_type (int) – enum dnbtcp_trace_legends

Return type:

bool

get_thickness(i_rep: int) int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetThickness(DNBTCPTraceReps iRep) As long

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.
Parameters:

i_rep (int) – enum dnbtcp_trace_reps

Return type:

int

get_type(i_rep: int) int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetType(DNBTCPTraceReps iRep) As long

Get the TCP trace component (DNBTCPTraceReps) type. For points, legal
values are :

1 : CROSS
2 : PLUS
3 : CONCENTRIC

For line and axis, legal values are :

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.
oType
Long. Depends on the DNBTCPTraceReps. Output parameter. Output
parameter.
Parameters:

i_rep (int) – enum dnbtcp_trace_reps

Return type:

int

get_visibility(i_rep: int) bool

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func GetVisibility(DNBTCPTraceReps iRep) As boolean

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.
Parameters:

i_rep (int) – enum dnbtcp_trace_reps

Return type:

bool

refresh_display() None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
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.
Return type:

None

reset_attached_owner() None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
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.
Return type:

None

reset_graphics(b_setting: bool) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub ResetGraphics(boolean 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.
Parameters:

b_setting (bool) –

Return type:

None

set_attached_owner(i_owner: AnyObject) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetAttachedOwner(AnyObject 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.
Parameters:

i_owner (AnyObject) –

Return type:

None

set_color(i_rep: int, i_r: int, i_g: int, i_b: int, i_a: int) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetColor(DNBTCPTraceReps iRep,
long iR,
long iG,
long iB,
long 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.
Parameters:
  • i_rep (int) – enum dnbtcp_trace_reps

  • i_r (int) –

  • i_g (int) –

  • i_b (int) –

  • i_a (int) –

Return type:

None

set_legends_visibility(i_type: int, ib_visible: bool) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetLegendsVisibility(DNBTCPTraceLegends iType,
boolean 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.
Parameters:
  • i_type (int) – enum dnbtcp_trace_legends

  • ib_visible (bool) –

Return type:

None

set_thickness(i_rep: int, i_thickness: int) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetThickness(DNBTCPTraceReps iRep,
long 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.
Parameters:
  • i_rep (int) – enum dnbtcp_trace_reps

  • i_thickness (int) –

Return type:

None

set_type(i_rep: int, i_type: int) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetType(DNBTCPTraceReps iRep,
long iType)

Set the TCP trace component (DNBTCPTraceReps) type. For points, legal
values are :

1 : CROSS
2 : PLUS
3 : CONCENTRIC

For line and axis, legal values are :

1 : solid
2 : dotted
3 : dashed
4 : dot-dashed
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.
Parameters:
  • i_rep (int) – enum dnbtcp_trace_reps

  • i_type (int) –

Return type:

None

set_visibility(i_rep: int, ib_visible: bool) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub SetVisibility(DNBTCPTraceReps iRep,
boolean 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.
Parameters:
  • i_rep (int) – enum dnbtcp_trace_reps

  • ib_visible (bool) –

Return type:

None

property total_points: int

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property TotalPoints() As long (Read Only)

Returns the number of points in the trace.

Parameters:

oNbPoints
Long. Contains the number of points.
Return type:

int

property trace_name: str

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property TraceName() As CATBSTR

Manage the name of the trace. Property can be retrieved and
valuated

Parameters:

oName
CATBSTR. String containing the retrieved name.
Return type:

str

property visibility: bool

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property Visibility() As boolean

Manage the visibility of the trace. Property can be retrieved and
valuated

1: shown
0: hidden

Parameters:

oVisibility
Boolean. Contains the return value.
Return type:

bool