Convert Data Type

Function

You can customize the input/output port type of this Step, and the data type of the input port will be converted to the data type of the output port.

Usage Scenario

This Step is widely used for data type converting and there is no specific usage scenario.

Input and Output

The input data type and the corresponding output data type(s) to which the input can be converted are listed in the table below. You can configure the ports of input data type and output data type according to the actual requirement.

Input Data Type

Output Data Type

Pose2DList

StringList

BoolList

StringList, String, String

StringList

BoolList, String, NumberList

String

BoolList, StringList, NumberList

NumberList

BoolList, StringList, String, Variant, VariantList

LineSegmentList

StringList

Variant

BoolList, StringList, String, NumberList, VariantList

VariantList

BoolList, StringList, String, NumberList, Variant

Shape2DList

StringList

The figure below shows an example of converting NumberList to BoolList.

../../../../../_images/input_and_output19.png

Parameter Description

  1. The Step does not have any input port or output port when it is just dragged to the graphical programming workspace, as shown below.

    ../../../../../_images/initial_state.png
  2. Go to the Step Parameters, click icon_down and select the input data type and output data type in the dropdown lists, and then corresponding ports will be added to the Step.

    ../../../../../_images/select_data_type.png
  3. Connect Steps.

    An example of possible connection is shown below.

    ../../../../../_images/connect_steps.png

Attention

  • When you change the data type of either the input or the output port, if the new data type cannot be converted to/from the data type of the other port, the data type of this other port is reset.

  • If the data type of a port is changed (including the reset mentioned above), connection(s) to this port is deleted, and you will need to reconnect the Steps.