& Construction
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing
Professional CAD/CAM tools built on Inventor and AutoCAD
Adapted parameters can be configured to include a minimum and maximum value range using the min and max functions of the parameter blocks.
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.