• Informed Design

Parameters Min Max – Codeblocks

Adapted parameters can be configured to include a minimum and maximum value range using the min and max functions of the parameter blocks.


00:03

Adopted parameters can be configured to include a minimum and maximum value

00:08

range using the men and max functions of the parameter blocks.

00:14

Here. A block setting, a list of values is converted into a min block

00:20

and then duplicated to create a max block,

00:27

updating the form.

00:29

The parameter now displays the minimum and maximum value

00:32

range as an informational label below the input control.

00:37

The parameter is tested with a value known to be above the max

00:42

value to ensure the logical intent of the code block is met.

00:48

Testing a number below the men value ensures the men block is working. Also

00:54

using the duplicate connected option allows us to quickly recreate the

00:58

men and max blocks for the length parameter as well,

01:02

discarding the length values list block and then using

01:06

the form to test ensures that the length parameters,

01:09

minimum and maximum value range is set up and working correctly.

01:15

We can add an increment value to the parameter controls in the form as well.

01:21

The increment function is selected from the list

01:24

and then the increment value is set as needed.

01:28

Repeating the same thing for the length block

01:30

quickly provides the increment block for this parameter.

01:34

Also

01:35

a right click in the canvas reveals the cleanup blocks option

01:40

which in this case simply tidies up the alignment of our blocks

01:45

using the update form button shows the increment information has

01:49

been added as an informational label below the input controls

01:54

using the up and down arrows.

01:55

In the parameter controls show the increments are working as intended.

02:02

You have full control over the form labels and can

02:05

change the labels from the defaults which often contain underscores

02:10

to something more reader friendly

02:15

here. The wall length parameter block is duplicated

02:19

and then the label function is selected from the list.

02:23

The block immediately kicks out the integer block as

02:27

it recognizes it is the incorrect data type.

02:30

We replace it with a basic text block and

02:33

supply a label string that is more reader friendly,

02:37

updating the form shows the new label value.

02:42

Next,

02:43

we duplicate the length parameter block to add a

02:46

read only block for the stud spacing parameter.

02:50

Again,

02:50

the block kicks out the incorrect data type block queuing

02:54

us to add a block of the correct data type.

02:57

In

02:57

this case, a boolean or true false block

03:01

duplicating the length label block allows us to quickly

03:04

create a similar block for the stud spacing.

03:08

Looking at the form,

03:10

we still see the underscore characters until the update button is used

03:14

to update the label and set the parameter to read only,

03:18

which is also indicated for us in the label.

03:22

You can also control the visibility of parameters in the form

03:26

here.

03:27

An if do block is added to evaluate if wall length exceeds the wall length max value.

03:34

Note the use of the external inputs option

03:37

to wrap the code block to fit more comfortably in the canvas.

03:42

Duplicating.

03:43

An existing block is a quick way to get most of what we need for the de portion block,

03:48

selecting the visible function and setting the true to false completes the block

03:54

testing in the form, we set the length parameter to exceed the max value.

03:59

And we see that the stud spacing control is set to be not visible in the form.

04:05

Setting the value to be less than the max brings the stud spacing control back.

04:12

You can add messages to the parameter controls as well.

04:16

Here, a variable has already been created to calculate the area of the wall.

04:21

Then a message block is added and the text message is set up using the create text

04:27

with block to combine static text with the

04:30

calculated area value pulled from the area variable.

04:36

The text is added to display a quick informational message

04:40

to inform the user of the calculated area based on the parameter change made,

04:46

changing the parameter in the form,

04:48

updates the message so that the updated area calculation is displayed to the user.

04:54

When they hover over the message icon.

04:58

You can also add an error message to the parameter input

05:02

here. The error block is set to true.

05:05

When the calculated area variable evaluates at less than 35.

05:10

When the condition specified is reached,

05:13

the parameter control in the form turns red

05:16

and displays the message specified in the text block of the message code block.

05:21

In summary parameters can be set to include min max and increments

05:26

allowing you to fine tune your parameter controls

05:30

form labels can be set by code block logic providing

05:34

you control over the text that displays for each parameter

05:39

parameters can be set to be read only and made not visible using code blocks,

05:45

dynamic information and error messages can be added

05:48

to the form using code blocks too.

Video transcript

00:03

Adopted parameters can be configured to include a minimum and maximum value

00:08

range using the men and max functions of the parameter blocks.

00:14

Here. A block setting, a list of values is converted into a min block

00:20

and then duplicated to create a max block,

00:27

updating the form.

00:29

The parameter now displays the minimum and maximum value

00:32

range as an informational label below the input control.

00:37

The parameter is tested with a value known to be above the max

00:42

value to ensure the logical intent of the code block is met.

00:48

Testing a number below the men value ensures the men block is working. Also

00:54

using the duplicate connected option allows us to quickly recreate the

00:58

men and max blocks for the length parameter as well,

01:02

discarding the length values list block and then using

01:06

the form to test ensures that the length parameters,

01:09

minimum and maximum value range is set up and working correctly.

01:15

We can add an increment value to the parameter controls in the form as well.

01:21

The increment function is selected from the list

01:24

and then the increment value is set as needed.

01:28

Repeating the same thing for the length block

01:30

quickly provides the increment block for this parameter.

01:34

Also

01:35

a right click in the canvas reveals the cleanup blocks option

01:40

which in this case simply tidies up the alignment of our blocks

01:45

using the update form button shows the increment information has

01:49

been added as an informational label below the input controls

01:54

using the up and down arrows.

01:55

In the parameter controls show the increments are working as intended.

02:02

You have full control over the form labels and can

02:05

change the labels from the defaults which often contain underscores

02:10

to something more reader friendly

02:15

here. The wall length parameter block is duplicated

02:19

and then the label function is selected from the list.

02:23

The block immediately kicks out the integer block as

02:27

it recognizes it is the incorrect data type.

02:30

We replace it with a basic text block and

02:33

supply a label string that is more reader friendly,

02:37

updating the form shows the new label value.

02:42

Next,

02:43

we duplicate the length parameter block to add a

02:46

read only block for the stud spacing parameter.

02:50

Again,

02:50

the block kicks out the incorrect data type block queuing

02:54

us to add a block of the correct data type.

02:57

In

02:57

this case, a boolean or true false block

03:01

duplicating the length label block allows us to quickly

03:04

create a similar block for the stud spacing.

03:08

Looking at the form,

03:10

we still see the underscore characters until the update button is used

03:14

to update the label and set the parameter to read only,

03:18

which is also indicated for us in the label.

03:22

You can also control the visibility of parameters in the form

03:26

here.

03:27

An if do block is added to evaluate if wall length exceeds the wall length max value.

03:34

Note the use of the external inputs option

03:37

to wrap the code block to fit more comfortably in the canvas.

03:42

Duplicating.

03:43

An existing block is a quick way to get most of what we need for the de portion block,

03:48

selecting the visible function and setting the true to false completes the block

03:54

testing in the form, we set the length parameter to exceed the max value.

03:59

And we see that the stud spacing control is set to be not visible in the form.

04:05

Setting the value to be less than the max brings the stud spacing control back.

04:12

You can add messages to the parameter controls as well.

04:16

Here, a variable has already been created to calculate the area of the wall.

04:21

Then a message block is added and the text message is set up using the create text

04:27

with block to combine static text with the

04:30

calculated area value pulled from the area variable.

04:36

The text is added to display a quick informational message

04:40

to inform the user of the calculated area based on the parameter change made,

04:46

changing the parameter in the form,

04:48

updates the message so that the updated area calculation is displayed to the user.

04:54

When they hover over the message icon.

04:58

You can also add an error message to the parameter input

05:02

here. The error block is set to true.

05:05

When the calculated area variable evaluates at less than 35.

05:10

When the condition specified is reached,

05:13

the parameter control in the form turns red

05:16

and displays the message specified in the text block of the message code block.

05:21

In summary parameters can be set to include min max and increments

05:26

allowing you to fine tune your parameter controls

05:30

form labels can be set by code block logic providing

05:34

you control over the text that displays for each parameter

05:39

parameters can be set to be read only and made not visible using code blocks,

05:45

dynamic information and error messages can be added

05:48

to the form using code blocks too.

Here, a block setting a list of values is converted into a min block and then duplicated to create a max block.

Updating the form, the parameter now displays the minimum and maximum value range as an informational label below the input control.

The parameter is tested with a value known to be above the max value to ensure the logical intent of the code block is met.

Testing a number below the men value ensures the men block is working also.

Using the duplicate connected option allows us to quickly recreate the men and blocks for the length parameter as well.

Discarding the length values list block and then using the form to test, ensures that the length parameters minimum and maximum value range is set up and working correctly.

We can add an increment value to the parameter controls in the form as well.

The increment function is selected from the list and then the increment value is set as needed.

Repeating the same thing for the length block quickly provides the increment block for this parameter also.

A right click in the canvas reveals the cleanup blocks option. Which in this case simply tidies up the alignment of our blocks.

Using the update form button shows the increment information has been added as an informational label below the input controls.

Using the up and down arrows in the parameter controls, show the increments are working as intended.

You have full control over the form labels and can change the labels from the defaults which often contain underscores.

To something more reader friendly.

Here, the wall length parameter block is duplicated, and then the label function is selected from the list.

The block immediately kicks out the integer block as it recognizes it is the incorrect data type.

We replace it with a basic text block and supply a label string that is more reader friendly.

Updating the form shows the new label value.

Next, we duplicate the length parameter block to add a read only block for the stud spacing parameter.

Again, the block kicks out the incorrect data type block. Queuing us to add a block of the correct data type. In this case, a bullion or true false block. Duplicating the length label block allows us to quickly create a similar block for the stud spacing.

Looking at the form, we still see the underscore characters until the update button is used to update the label. And set the parameter to read only, which is also indicated for us in the label.

You can control the visibility of parameters in the form. Here, an if do block is added to evaluate if wall length exceeds the wall length max value.

Note the use of the external inputs option to wrap the code block to fit more comfortably in the canvas.

Douplicating an existing block is a quick way to get most of what we need for the do portion block.

Selecting the visible function and setting the true to false completes the block.

Testing in the form, we set the length parameter to exceed the max value, and we see that the stud spacing control is set to be not visible in the form.

Setting the value to be less than the max brings the stud spacing control back.

You can add messages to the parameter controls as well. Here, a variable has already been created to calculate the area of the wall.

Then a message block is added, and the text message is set up using the create text with block to combine static text with the calculated area value pulled from the area variable.

The text is added to display quick informational message to inform the user of the calculated area based on the parameter change made.

Changing the parameter in the form updates the message so that the updated area calculation is displayed to the user when they hover over the message icon.

You can also add an error message to the parameter input.

Here, the error block is set to true when the calculated area variable evaluates at less than thirty five. When the condition specified is reached, the parameter control in the form turns red and displays the message specified in the text block the message code block. In summary, parameters can be set to include min, max, and increments, allowing you to fine tune your parameter controls.

Form labels can be set by code block logic providing you control over the text that displays for each parameter.

Parameters can be set to be read only and made not visible using code blocks.

Dynamic information and error messages can be added to the form using code blocks too.

 
Was this information helpful?