Goal

Save the indices of a loop to a local file.

Table of Contents

Prerequisites

Final Workflow

The figure below shows the final layout of the workflow. HW_loop_01_save_indexes_final_workflow

Creating and Filling out

1- [Node 1] - Add a Loop Node

  • How:

    • In the workspace, right-click and select Add ControlLoop (Built-in Node).

HW_loop_01_save_indexes_create_loop

2- [Nodes 2, 3, 4, 7] - Add and fill out Source Nodes (Variables)

  • How:

    • In the workspace, right-click and select Add Source → Integer (2, 3, 4).

    • In the workspace, right-click and select Add Source → String (7).

3_text_nodes

  • Node 2 : Set Start Index.
  • Node 3 : Set End Index.
  • Node 4 : Set Step Size.
  • Node 7 : Set Output File Path. (If the file does not exist, it will be created automatically.)

3- [Node 5] - Add a workflow-nodes system echo Node

workflow_system_echo_1

workflow_system_echo_3

Connection

  • Pay attention to the ports colors.

    • Variabls (light green)
    • stdin/stdout ports (dark green)
    • Integer (light orange)

Running

1- Save the workflow by pushing Play button.

HW_loop_01_save_indexes_saving

2- Start running the workflow by using Start button.

running_2

3- Status: Finished

final_status

4- The indexes are stored at the specified file.

Results

The figure below shows the results.

HW_loop_01_save_indexes_results

Done.