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.
Parameter Description¶
The Step does not have any input port or output port when it is just dragged to the graphical programming workspace, as shown below.
Go to the Step Parameters, click and select the input data type and output data type in the dropdown lists, and then corresponding ports will be added to the Step.
Connect Steps.
An example of possible connection is shown below.
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.