& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Use code blocks to set parameter minimums, maximums, and increments in the Informed Design Codeblocks Rule Editor.
Transcript
00:02
Adopted parameters can be configured to include a minimum and maximum value range
00:09
using the min and max functions of the parameter blocks.
00:13
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:24
Updating the form, the parameter now displays the minimum and maximum value range
00:33
as an informational label below the input control.
00:37
The parameter is tested with a value known to be above the max value
00:42
to ensure the logical intent of the code block is met.
00:47
Testing a number below the min value ensures the min block is working also.
00:53
Using the Duplicate Connected option allows us to quickly recreate the Min and Max blocks for the length parameter as well.
01:02
Discarding the Length Values List block, and then using the form to test,
01:08
ensures that the length parameter’s minimum and maximum value range is set up and working correctly.
01:14
We can add an increment value to the parameter controls in the form as well.
01:20
The increment function is selected from the list, and then the increment value is set as needed.
01:27
Repeating the same thing for the Length block quickly provides the Increment block for this parameter also.
01:35
A right-click in the canvas reveals the Clean up 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 been added as an informational label below the input controls.
01:53
Using the Up and Down arrows in the parameter controls show the increments are working as intended.
02:01
You have full control over the form labels and can change the labels from the defaults,
02:07
which often contain underscores, to something more reader friendly.
02:14
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 it recognizes it is the incorrect data type.
02:30
We replace it with a basic Text block and supply a label string that is more reader friendly.
02:37
Updating the form shows the new value.
02:41
Next, we duplicate the Length Parameter block to add a Read-Only block for the stud spacing parameter.
02:49
Again, the block kicks out the incorrect data type block,
02:53
queuing us to add a block of the correct data type;
02:57
in this case, a Boolean or True False block.
03:01
Duplicating the Length Label block allows us to quickly create a similar block for the Stud Spacing.
03:08
Looking at the form, we still see the underscore characters until the Update button is used to update the label
03:15
and set the parameter to read-only, 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, an If Do block is added to evaluate if wall length exceeds the wall length max value.
03:33
Note the use of the External Inputs option to wrap the code block to fit more comfortably in the canvas.
03:41
Duplicating an existing block is a quick way to get most of what we need for the Do 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:11
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 With block,
04:28
to combine static text with the calculated area value pulled from the area variable.
04:34
The text is added to display a quick informational message to inform the user of the calculated area,
04:43
based on the parameter change made.
04:46
Changing the parameter in the form updates the message, so that the updated area calculation is displayed to the user
04:54
when they hover over the message icon.
04:57
You can also add an error message to the parameter input.
05:02
Here, the error block is set to True 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 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,
05:33
providing 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:44
Dynamic information and error messages can be added to the form using code blocks, too.
00:02
Adopted parameters can be configured to include a minimum and maximum value range
00:09
using the min and max functions of the parameter blocks.
00:13
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:24
Updating the form, the parameter now displays the minimum and maximum value range
00:33
as an informational label below the input control.
00:37
The parameter is tested with a value known to be above the max value
00:42
to ensure the logical intent of the code block is met.
00:47
Testing a number below the min value ensures the min block is working also.
00:53
Using the Duplicate Connected option allows us to quickly recreate the Min and Max blocks for the length parameter as well.
01:02
Discarding the Length Values List block, and then using the form to test,
01:08
ensures that the length parameter’s minimum and maximum value range is set up and working correctly.
01:14
We can add an increment value to the parameter controls in the form as well.
01:20
The increment function is selected from the list, and then the increment value is set as needed.
01:27
Repeating the same thing for the Length block quickly provides the Increment block for this parameter also.
01:35
A right-click in the canvas reveals the Clean up 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 been added as an informational label below the input controls.
01:53
Using the Up and Down arrows in the parameter controls show the increments are working as intended.
02:01
You have full control over the form labels and can change the labels from the defaults,
02:07
which often contain underscores, to something more reader friendly.
02:14
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 it recognizes it is the incorrect data type.
02:30
We replace it with a basic Text block and supply a label string that is more reader friendly.
02:37
Updating the form shows the new value.
02:41
Next, we duplicate the Length Parameter block to add a Read-Only block for the stud spacing parameter.
02:49
Again, the block kicks out the incorrect data type block,
02:53
queuing us to add a block of the correct data type;
02:57
in this case, a Boolean or True False block.
03:01
Duplicating the Length Label block allows us to quickly create a similar block for the Stud Spacing.
03:08
Looking at the form, we still see the underscore characters until the Update button is used to update the label
03:15
and set the parameter to read-only, 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, an If Do block is added to evaluate if wall length exceeds the wall length max value.
03:33
Note the use of the External Inputs option to wrap the code block to fit more comfortably in the canvas.
03:41
Duplicating an existing block is a quick way to get most of what we need for the Do 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:11
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 With block,
04:28
to combine static text with the calculated area value pulled from the area variable.
04:34
The text is added to display a quick informational message to inform the user of the calculated area,
04:43
based on the parameter change made.
04:46
Changing the parameter in the form updates the message, so that the updated area calculation is displayed to the user
04:54
when they hover over the message icon.
04:57
You can also add an error message to the parameter input.
05:02
Here, the error block is set to True 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 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,
05:33
providing 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:44
Dynamic information and error messages can be added to the form using code blocks, too.
In Informed Design, code blocks can be used to set parameter minimums, maximums, and increments, as well as to edit labels and add messages.
Adopted parameters can be configured to include a minimum and maximum value range by applying the Min and Max functions within the parameter blocks.
Begin with blocks setting lists of values already created, as shown below.
To create a minimum and maximum value range for the Nominal Wall Height parameter:
The minimum and maximum value range is displayed as an informational label below the Nominal Wall Height input.
The parameter resets to the maximum value, with a message that explains the adjustment.
To set a Min and Max for the Nominal Wall Length parameter:
The minimum and maximum value range appears below the Nominal Wall Length input, and testing values outside the range confirms that it is working correctly.
Next, use an increment value in a parameter block to specify the increments available within the minimum and maximum value range.
The increment information displays below the input controls, and using the up and down arrows verifies that the increments are working as intended.
Next, adjust the default form labels by removing the underscores and applying a reader-friendly label:
The parameter block automatically removes the Math Number block, because it is the incorrect data type.
Now, update the Stud Spacing parameter to be read-only and remove the underscore from its label:
The block automatically removes the Math Number block, prompting placement of the correct data type.
The label updates, and the Stud Spacing parameter is now read-only.
To control the visibility of parameters in the form, based on a specified condition:
Next, add messages to the parameter controls:
Next, add an error message to the parameter input, based on a specific condition:
When the condition is true, the Wall Length parameter in the form turns red and displays the specified message.
In summary, there are various ways to adjust and control parameters using code blocks. You can define minimums, maximums, and increments for acceptable parameter values, customize parameter labels, and set parameters to be read-only or not visible. Furthermore, you can use code blocks to add dynamic information and error messages that display when specific conditions are met for parameters.