UIFlow block customization

Creating a block

Click on the Custom option in the block list > Create , to create a custom block.

To create a new program block, we need to provide .

1:Group name: the name of the group in which the custom block will be placed.

2:Block color: the color of the block's appearance

3:Block Label: only letters, numbers, underscores are allowed.

4:Block type: defines the type of the block as either Value (numeric) or Execute.

5:Number of blocks: can add more than one block at the same time and save them to a single .m5b file at the same time.

Block Code - Passing Parameters

Click the Add option below Parameter to add a program attribute, enter the name of the block to be displayed and select the attribute type, and enter the code to be included in the custom block in the Block Code box.

Click here to visit Github for more program APIs.

When the attribute type of a custom block has a constant or variable input, we can get these values in the code and do further processing and arithmetic.

Example: If we choose String as the property type, then in the program, if we want to get the input string, we only need to use ${Parameter name} in the code, that is, ${show_word}, and we need to pay attention to the fact that when there is a space in the name of the block, we need to replace the space with an underscore of _ in the code, and we need to use the underscore of _ to replace the space. Use _ underscores to replace spaces.

Program block save-modify

When you have finished editing the program, click Download to save it.

Click Open .m5b to open the saved custom program for modification.

Using program blocks

Click on the Custom option in the block list > Open , to open a custom block.

On This Page