& Construction

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

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
Informed Design uses rules created from code blocks to govern the input values and options that control the informed design form.
Type:
Tutorial
Length:
5 min.
Transcript
00:03
Informed Design utilizes rules created from code blocks to manage the input values and options for the Informed Design form.
00:11
To access Codeblocks, with your Inventor project open, on the Informed Design tab of the ribbon, click Product Definition.
00:21
Select the appropriate product definition and click Edit.
00:26
Then, on the Rules tab, select the Input workspace.
00:31
The logic contained in the Codeblocks helps you define and restrict the options, values,
00:37
and combinations of values that can be entered into the form,
00:40
ensuring that only valid, manufacturable product variants are defined.
00:45
For example, you can configure a drop-down so that only specific options can be selected,
00:51
or you can set a minimum or maximum allowable value for an input in the form.
00:56
Before designing your form, it is important to first adopt Parameters.
01:01
The product definition automatically lists the Inventor User parameters;
01:06
however, you can choose from other Parameter lists.
01:09
In this case, select Key parameters.
01:14
Now, select the Inventor parameters to adopt as Informed Design parameters;
01:19
for example, Nominal_Wall_Length, Opening_Width, and Wall_Length_in.
01:28
Adopted parameters display on the Rules tab, in the Form workspace.
01:33
This workspace is used to design and customize the visible aspects of the Informed Design form,
01:39
such as organizing fields and applying names to the input fields.
01:44
In this example, underscores are removed from the label names, and the Form is renamed to “Wall Configurator”.
01:52
After making updates, click Update form to view the changes.
01:57
The Input workspace is used to build the logic and apply constraints that govern the values and options within the form.
02:04
Adopted parameters that contain a list are automatically added to the Input workspace.
02:10
For example, the Nominal Wall Length parameter shown has a list of available selections to choose from.
02:17
The Codeblocks library contains a comprehensive set of code blocks within different categories
02:22
to allow you to build logic rules that govern the design intent of your Inventor model.
02:27
These include:
02:28
Logic blocks to allow the creation of conditional statements,
02:33
Loops blocks to allow the iteration of code,
02:36
Math blocks to assist with calculations,
02:40
Text blocks for working with strings,
02:43
Lists blocks for working with collections,
02:47
Variables, which are user-created containers to hold data,
02:51
Functions, which can be reused to perform common tasks within a rule,
02:55
and Parameters, which are adopted from the Inventor model.
03:01
You can create variables to perform intermediate calculations, such as a conversion from feet to inches.
03:08
In this example, select Variables > Create variable.
03:15
In the New variable name dialog, type “Feet_To_in”, and then click OK.
03:24
Open the Variables library again and drag the newly created Set Variable block into the workspace.
03:30
Add an Operation Math block to the Variable block, and then add a Nominal Wall Length value Parameter block,
03:37
as well as a Math Number block.
03:40
Adjust the blocks so that the logic will multiply the Nominal Wall Length value parameter by 12 to convert it to inches.
03:48
A parameter block can be used to map the variable value to an input.
03:52
Here, two Nominal Wall Length value blocks are added beneath the Set variable block,
03:57
then adjusted to map to the Wall_Length_in parameter.
04:01
In this case, the input is only for information.
04:05
Add the Set Feet To in Variable block to the first parameter.
04:11
Next, set the second parameter block to readOnly, adding a True False Logic block with a value of True.
04:20
Click Update form to see that the Wall Length (in) input field in the form
04:24
automatically converts the Nominal Wall Length into inches and is a read-only field.
04:30
The parameter block can control allowable inputs.
04:33
In this example, add another Nominal Wall Length value parameter block to the workspace, and set it to Opening_Width.
04:42
Adjust the value to min and add a Math Number block with a value of 16.
04:48
This will ensure that the opening width is at least 16 inches.
04:53
Update the form.
04:56
Notice the label beneath the input field now communicates the minimum allowable value.
05:02
Enter a value less than the minimum, such as 8, and the input value automatically resets to 16.
05:09
Hover the cursor over the message icon to view the corresponding message.
05:14
Next, set a maximum value for the opening width by creating a variable called Max_Opening_Width.
05:21
Here, blocks are pulled from the Codeblocks library and arranged to create the logic to set the maximum opening.
05:28
In this case, the finished block statement reads Set the Max_Opening_Width to Feet_To_in plus 9.
05:36
Next, create logic to ensure that the opening width does not exceed the maximum opening width
05:42
as calculated by the previously created variable.
05:45
In this example, use the conditional If Do block statement,
05:48
along with parameter and variable blocks,
05:51
to create a block set that reads
05:54
if the Opening_Width is greater than the Max_Opening_Width,
05:57
then set the Opening_Width to equal the Max_Opening_Width.
06:00
Now, snap all the code blocks together into one set to organize the workspace.
06:07
Click Update form to see the changes.
06:11
Once you have created your logic, test it by entering values in the form above or below the constrained values.
06:18
For example, enter a value of 999 for the Opening Width.
06:23
The field automatically updates to equal the Wall Length in inches plus 9, or in this case, 81.
06:31
To see the Inventor model update, click Set model values.
06:37
Testing the maximum value of the opening width and viewing the result in the Inventor model shows that there is an unexpected error.
06:44
The opening width exceeds the length of the wall in inches.
06:48
Review the code blocks to identify the error in the logic.
06:52
In this case, the Max_Opening_Width variable is set to add 9 inches, instead of subtracting 9 inches.
06:59
Update the operation to subtraction, and then click Update form.
07:05
Test the form again by entering a value of 999 in the Opening Width.
07:11
The value automatically updates to 63.
07:15
Click Set model values and the Inventor model updates, confirming that the fix is successful.
Video transcript
00:03
Informed Design utilizes rules created from code blocks to manage the input values and options for the Informed Design form.
00:11
To access Codeblocks, with your Inventor project open, on the Informed Design tab of the ribbon, click Product Definition.
00:21
Select the appropriate product definition and click Edit.
00:26
Then, on the Rules tab, select the Input workspace.
00:31
The logic contained in the Codeblocks helps you define and restrict the options, values,
00:37
and combinations of values that can be entered into the form,
00:40
ensuring that only valid, manufacturable product variants are defined.
00:45
For example, you can configure a drop-down so that only specific options can be selected,
00:51
or you can set a minimum or maximum allowable value for an input in the form.
00:56
Before designing your form, it is important to first adopt Parameters.
01:01
The product definition automatically lists the Inventor User parameters;
01:06
however, you can choose from other Parameter lists.
01:09
In this case, select Key parameters.
01:14
Now, select the Inventor parameters to adopt as Informed Design parameters;
01:19
for example, Nominal_Wall_Length, Opening_Width, and Wall_Length_in.
01:28
Adopted parameters display on the Rules tab, in the Form workspace.
01:33
This workspace is used to design and customize the visible aspects of the Informed Design form,
01:39
such as organizing fields and applying names to the input fields.
01:44
In this example, underscores are removed from the label names, and the Form is renamed to “Wall Configurator”.
01:52
After making updates, click Update form to view the changes.
01:57
The Input workspace is used to build the logic and apply constraints that govern the values and options within the form.
02:04
Adopted parameters that contain a list are automatically added to the Input workspace.
02:10
For example, the Nominal Wall Length parameter shown has a list of available selections to choose from.
02:17
The Codeblocks library contains a comprehensive set of code blocks within different categories
02:22
to allow you to build logic rules that govern the design intent of your Inventor model.
02:27
These include:
02:28
Logic blocks to allow the creation of conditional statements,
02:33
Loops blocks to allow the iteration of code,
02:36
Math blocks to assist with calculations,
02:40
Text blocks for working with strings,
02:43
Lists blocks for working with collections,
02:47
Variables, which are user-created containers to hold data,
02:51
Functions, which can be reused to perform common tasks within a rule,
02:55
and Parameters, which are adopted from the Inventor model.
03:01
You can create variables to perform intermediate calculations, such as a conversion from feet to inches.
03:08
In this example, select Variables > Create variable.
03:15
In the New variable name dialog, type “Feet_To_in”, and then click OK.
03:24
Open the Variables library again and drag the newly created Set Variable block into the workspace.
03:30
Add an Operation Math block to the Variable block, and then add a Nominal Wall Length value Parameter block,
03:37
as well as a Math Number block.
03:40
Adjust the blocks so that the logic will multiply the Nominal Wall Length value parameter by 12 to convert it to inches.
03:48
A parameter block can be used to map the variable value to an input.
03:52
Here, two Nominal Wall Length value blocks are added beneath the Set variable block,
03:57
then adjusted to map to the Wall_Length_in parameter.
04:01
In this case, the input is only for information.
04:05
Add the Set Feet To in Variable block to the first parameter.
04:11
Next, set the second parameter block to readOnly, adding a True False Logic block with a value of True.
04:20
Click Update form to see that the Wall Length (in) input field in the form
04:24
automatically converts the Nominal Wall Length into inches and is a read-only field.
04:30
The parameter block can control allowable inputs.
04:33
In this example, add another Nominal Wall Length value parameter block to the workspace, and set it to Opening_Width.
04:42
Adjust the value to min and add a Math Number block with a value of 16.
04:48
This will ensure that the opening width is at least 16 inches.
04:53
Update the form.
04:56
Notice the label beneath the input field now communicates the minimum allowable value.
05:02
Enter a value less than the minimum, such as 8, and the input value automatically resets to 16.
05:09
Hover the cursor over the message icon to view the corresponding message.
05:14
Next, set a maximum value for the opening width by creating a variable called Max_Opening_Width.
05:21
Here, blocks are pulled from the Codeblocks library and arranged to create the logic to set the maximum opening.
05:28
In this case, the finished block statement reads Set the Max_Opening_Width to Feet_To_in plus 9.
05:36
Next, create logic to ensure that the opening width does not exceed the maximum opening width
05:42
as calculated by the previously created variable.
05:45
In this example, use the conditional If Do block statement,
05:48
along with parameter and variable blocks,
05:51
to create a block set that reads
05:54
if the Opening_Width is greater than the Max_Opening_Width,
05:57
then set the Opening_Width to equal the Max_Opening_Width.
06:00
Now, snap all the code blocks together into one set to organize the workspace.
06:07
Click Update form to see the changes.
06:11
Once you have created your logic, test it by entering values in the form above or below the constrained values.
06:18
For example, enter a value of 999 for the Opening Width.
06:23
The field automatically updates to equal the Wall Length in inches plus 9, or in this case, 81.
06:31
To see the Inventor model update, click Set model values.
06:37
Testing the maximum value of the opening width and viewing the result in the Inventor model shows that there is an unexpected error.
06:44
The opening width exceeds the length of the wall in inches.
06:48
Review the code blocks to identify the error in the logic.
06:52
In this case, the Max_Opening_Width variable is set to add 9 inches, instead of subtracting 9 inches.
06:59
Update the operation to subtraction, and then click Update form.
07:05
Test the form again by entering a value of 999 in the Opening Width.
07:11
The value automatically updates to 63.
07:15
Click Set model values and the Inventor model updates, confirming that the fix is successful.
These code blocks are accessed from the product definition under the rules tab.
The logic within the code blocks constrain the values and options such that it is only possible to enter valid values or valid combinations of values and options that to get define valid manufacturable product variants.
The product definition automatically lists the Inventor user parameters in the parameters tab.
Within this tab, you can choose which Inventor parameters to adopt as informed design parameters.
The order the parameters are listed is the same order in which the parameters are displayed in the informed design input form found in the rules tab.
The parameters list can be filtered by all model, user, key, as well as selected. In the rules tab, code blocks for parameters containing a list are automatically added to the rule.
The informed design block library contains a rich set of code blocks of various categories to allow you to build robust logic rules to govern the design intent of your Inventor model. These include logic blocks to allow the creation of conditional statements.
Loop blocks to allow the iteration of code.
Mathematical blocks to assist with calculations.
A large collection of text blocks.
List blocks for working with collections.
Variables which are user created containers to hold data.
Functions, which can be created to be reused to perform common tasks within your rule.
And parameters, which are adopted from the Inventor model.
You can create local variables to do intermediate calculations, such as a conversion from feet to inches.
Here, this is done by employing the code blocks from the math category to multiply the parameter by a value of twelve.
With code blocks, you can create a conditional if do rule statement to govern the minimum value of an adopted Inventor user parameter.
Here, the logic is created to check that the opening width parameter is not less than sixteen.
When an input value of less than sixteen is detected, The logic resets the parameter to sixteen to maintain the minimum allowable value.
To govern the maximum value of the opening width, a variable called max opening width is created to perform an intermediate calculation.
To calculate that the maximum is the wall length minus nine.
Blocks are pulled from the code block library and arrange to create the logic or equation to match the intended rule logic.
Snaping the blocks together, is as easy as dragging and dropping the puzzle piece ends to fit.
Next, logic is created to check that the opening width parameter does not exceed the maximum opening width as calculated by the previously created variable.
This is done by employing the conditional if do code block statement.
Once complete, the code blocks are snapped together by simply dragging and dropping in order to tidy up the code block rule space. To test the code block logic, you can use the informed design form and enter values that are below the specified minimum and maximum values.
To see the Inventor model update, click the set model values button.
Testing the maximum value of the opening width seems to return an unexpected value as the opening width exceeds the length of the wall in inches.
A quick review of the code block identifies the error.
Updating the code block and retesting using the form and the set model values button confirms the fix.
In summary, the code block library contains code blocks of various categories to allow creation of product definition logic rules. You can create minmax logic to govern the form inputs to maintain the design intent of the Inventor model Conditional logic statements can be created with if do code blocks to govern inputs and options.
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Sign in for the best experience
Save your progress
Get access to courses
Receive personalized recommendations
May we collect and use your data?
Learn more about the Third Party Services we use and our Privacy Statement.May we collect and use your data to tailor your experience?
Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.