Autodesk Informed Design helps building component manufacturers supply configurable content to building designers.
Configurable models of building products and components are built in Autodesk Inventor and published to Informed Design.
In Revit, Informed Design is used to discover, configure, and generate Revit families from the options provided by the product publisher.
The Revit user configures options using a Form designed by the product publisher. The product publisher can limit the inputs on the form to manufacturable values.
Click here to learn more about Informed Design.
This input logic is defined with Informed Design Codeblocks, a ‘drag and drop’ logic interface found in Informed Design for Inventor, Product Definition, Rules Tab, Input workspace.
In Informed Design, a codeblock function is a reusable module of code that performs a specific task.
Functions are used to encapsulate logic or calculations, which can be called from other Codeblocks.
Click here for Informed Design Codeblock Video Learning
You can find the Function Codeblocks in the Library under ‘Functions’. There are two function codeblocks.
In this example, we’ll create a function to convert the units of an input and display it back to the user.
I’ve started by creating Parameters in Inventor. I’ve included placeholder parameters for use in the Product Definition form. These parameters aren’t used in my model; I’ve set the units to ul and values to 0.
I will use Width_in, Depth_in, and Height_in as read-only inputs in the Product Definition Form to display values in alternative units.
In the product definition, parameters tab, I’ve adopted the parameters.
In the Rules tab, Forms workspace, I’ve ordered the inputs and renamed the inputs and the Form itself.
TIP: Remember to click ‘Update Form’ to see the changes in the preview.
In the Rules tab, Forms workspace, I started by creating a variable to hold the converted value.
Next, I added a Function block. I choose a ‘do something and return’ block.
TIP: I don’t want users to change the returned values shown in Inches, so I’ve added Codeblocks to set these inputs to read-only.
With the Function block in the canvas, I clicked on the ‘+’ (Plus) symbol to add a function variable. This variable holds the value that we will pass into the Function.
As soon as the variable is created in the Function block, it can also be found in the variables section of the Codeblock library.
Note: The variable can be found immediately in the Codeblock Library.
Using the Codeblocks from the library, I added blocks to convert my input value into my output value.
In this case, we are taking the ‘Value in Inches’, and making it equal to the input value, multiplied by 0.039.
The value is returned via the ‘value_in_inches’ variable.
The final step is to use the Function calling block. This is the block we will use to call our function. We will pass the calling block a value, and do something with the output.
I pass the Function calling block the ‘Width’ value, which is converted, and passed to the read-only ‘Width_in’ input.
On updating the Form, we can see the value in inches in the read-only ‘Width (in)’ input field.
The final step is to ‘Duplicate Connected’, changing the parameters we pass into the calling block, and the parameters that will receive the output value.
TIP: The values in the read-only inputs will not equal the values of the parameters we adopted from the model (we set them to ‘0’ remember!). We can use ‘Set Model Values’ and ‘Get Model Values’ to sync up the parameter values ready for publishing.
Informed Design Codeblock Functions can be used to optimize your input logic, making it easier to read and quicker to produce.
If you ever find yourself copying the same blocks of code multiple times, consider whether you could use a Function instead!
Final tip: Use the Backpack, or export code blocks to re-use your Functions across multiple Product definitions. Click here for more Codeblock best practices.