Autodesk Informed Design allows publishers to define a form that can be used in Revit to configure and place Revit families derived from manufacturing models.
The form is created in Autodesk Inventor and includes input logic to control allowable values. This prevents configurations that don’t meet manufacturing requirements.
Input logic is defined using Codeblocks. In this article, we’ll learn how to set a minimum and maximum input value, and then dynamically update those values to suit our model.
Learn more about Informed Design for Inventor
Our example is the Basic Wall Panel with Window Opening from the Informed Design Sample Datasets.
Goals:
Video tutorials: Informed Design Codeblocks
To set a minimum for an input with Codeblocks, we take a Parameter block, change the option to ‘min’, and add a number block to contain the minimum value.
We can then copy this, change the option to ‘increment’, and change the value. The opening now has a minimum value of 18 inches.
Only values that are increments of 3 inches will be accepted. Informed Design will automatically adjust and correct any non-compliant inputs.
Informed Design automatically adds information to the input, to communicate this requirement to the user.
The Codeblock added in the image below is used to add a custom message. Adding a message is optional. Informed Design will automatically add a message to any input that has limits defined. This custom message overrides the automated message.
The image below shows a preview of the message that the user will see when they hover over the ‘i’ icon.
Tip: Remember to click ‘Update form’ to see the results.
The maximum is a little trickier.
In this example, the Wall Length is set by a list. The listed values are in Feet. Our opening is defined in Inches.
So, we need to convert the Wall Length value from Feet to inches, then adjust it for our border, which is 9 inches.
First, we convert the current Wall Length from Feet to Inches, using math blocks to multiply by 12.
Then take away 9 (note the use of Codeblock inline, and external inputs!)
And finally, set this number as the maximum opening width. The maximum opening width will now be the Wall Length, in inches, minus 9.
We can apply the same logic to the opening height by copying and adjusting the Codeblocks.
We snap the blocks together, and then use ’Duplicate connected’ on the context menu.
The image below shows the completed Codeblock input logic.
If you want to try this yourself, download the dataset from the Informed Design sample datasets and create a new product definition to follow this tutorial.
Autodesk informed Design, Completed exercise in the Codeblock editor