Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

Exercise: Using a Recipe to Adjust Parameters

Recipe Configuration

  1. Begin by creating 4 Tags. The first tag will be named “Record_ID”, its Data Type will be an INT (INT16), and the Initial Value is 0. The second tag will be named “Width”. It will also have a Data Type of INT (INT16), it will also have an Initial Value of 300. There will also be a String tag named “Color”; the Initial Value is #FF0000. Finally, the last tag will be a BOOL tag named “Visibility”, it’s Initial Value will be set to “True”.

  1. Go to Tools > Recipe Editor, or click on Open Recipe Editor… icon within the Toolbar. Click the + to create a new Recipe. The Record ID Tag will be set to the “Record_ID” tag that was created in Step One. Once that is set, click OK to create the Recipe. Select the new Recipe, and click on Edit Parameter Bindings. Create new Parameters until there are three Parameters; this can be achieved by clicking the + icon on the Tag Binding Page. Set the first parameter tag to be Width, the second should be Color, and the third will be Visibility. Click OK to exit the page.

  1. Now, double-click the blank cell under Width. Enter a value of 300 here. Again, double-click Color to change the value to #0000FF. Lastly, double-click the blank visibility cell and have the value set to 1. Click OK to exit out of the Recipe Editor.

  1. Create three Text Boxes and four Rectangles. three of the Rectangles should be placed on the right side of the Screen, while the last one will take up most of the left and middle of the screen. The three Text Boxes will be placed above the final Rectangle. The Text Boxes will have the following text: “Edit Width”, “Edit Color”, and “Edit Visibility”.

  1. Click on the “Edit Width” text box, then click on the Actions tab and create a new On Press Command. Select Enter Tag Value; the tag that will be connected to it is “Width.” The Header will say “Set Width Value” with a Subheader of “Min 0, Max 450” and enable Use Min/Max and set the Min to 0 and the Max to 450. Click OK to exit. Now, select the Edit Color text box, click on the Actions tab, and create a new On Press Command. Select Enter Tag Value; the tag that will be connected to it is “Color.” It will be of the Type Text. The Header will say “Enter Color” with a Subheader of “Use Hex Code.” Click OK to exit. Finally, click on Edit Visibility, then click on the Actions tab and create a new On Press Command. Select Toggle Tag Value and set the Tag to “Visibility”. Click OK to exit.

  1. Now add Action Commands to the three Rectangles on the right side. Select the top one, go to the Actions tab, and create a new On Press Command. Select Send Recipe Record, and select the Recipe Database that was created, enable Use Record ID Tag, and the Record ID Tag will be “Record_ID.” Now the middle one, go to the Actions tab and create a new On Press Command. Select Recieve Recipe Record, and select the Recipe Database that was created, enable Use Record ID Tag, and the Record ID Tag will be “Record_ID.” For the bottom one, go to the Actions tab and create a new On Press Command. Select Open Recipe Config and select the Recipe that was created.

  1. Now, for the final Rectangle, click and drag the tag “Visibility” to the Visibility Field under the Appearance tab. Click and drag the “Color” tag to the Fill field under Appearance. Lastly, drag the “Width” tag to the Width field under the Transform tab.

Recipe Runtime

  • No labels