• Informed Design
  • Inventor

Codeblocks - design forms

Design an input form, including labelling, ordering and grouping inputs with the Informed Design Codeblocks Editor.


Step-by-step guide

Informed Design includes a Form code blocks environment for controlling input forms.

  • In the Informed Design interface, Rules tab, Form code blocks environment, a Form block that includes two Groups created in the canvas; and in the form, the corresponding groups of input fields.

Before using the Form environment, on the Parameters tab, adopt and arrange the parameters required for input logic, input forms, and Inventor model usage.

  • The Parameters tab with the parameters selected on the left and the Adopted Parameter order shown on the right.

Here, the adoption order is important, so that parameters are passed correctly to the Inventor model. This ensures that updates are driven correctly and also serves as the default order for the Form block.

However, in the Form block, parameters can be reordered without impacting the adoption order.

  1. On the Rules tab, in the Form block, select and move the Exterior and Interior Panel Material parameters above the Wall Depth.
  2. Select the Parameters tab. The adopted order still shows the Exterior and Interior parameters below the Wall Depth parameter.
  • On the left, the Form block with the Exterior Panel Material and Interior Panel Material parameters re-ordered, and on the right, the unchanged Adopted order on the Parameters tab.

Additional parameters can be adopted and rearranged.

  1. On the Parameters tab, add Stud_Pattern_Count to add it to the Adopted list and then move the parameter below Exterior Panel Material.
  • On the Parameters tab, the Stud_Pattern_Count parameter selected in the list and moved beneath the Exterior Panel Material in the Adopted order.
  1. Switch to the Rules tab, where the parameter has been added to the bottom of the Form block and to the Form.
  • On the Rules tab, the Stud Pattern Count parameter added to the bottom of the Form block and to the Form.

Parameters can also be unadopted.

  1. On the Parameters tab, deselect Stud_Pattern_Count.
  2. Switch to the Rules tab, where the parameter is disabled in the Form block and removed from the form.

Parameters can be gathered into logical top-level groups within the form block, and a group can be collapsed or expanded in the form by default.

  1. In the Forms library, select and add the Group block to the Form block.
  2. Add all parameters to the Group except Stud_Spacing.
  • On the left, the Forms library expanded to show the Group block on the right, the Group block added to the Form block, with all parameters except Stud Spacing added to the group.
  1. Select or deselect Open by default to automatically collapse or expand the Group within the form.
  2. Enter a meaningful name for the Group, such as "Nominal Sizes".
  3. Click Update form to add the Group, which is expanded by default and does not include the Stud Spacing parameter.
  • In the canvas, the Group renamed to Nominal Sizes; and in the updated form, the added Nominal Sizes group, expanded by default and with a line separating the included parameters from Stud Spacing.

Form groups cannot be nested, and all associated parameter blocks are deleted when a group is deleted.

Parameter inputs can be duplicated for a form to show critical values within different form groups. If the value is modified for one input parameter, then the value automatically updates for any duplicates.

  • On the canvas, the Nominal Wall Length parameter duplicated in the Form block; and in the form, a value of 10 entered for the first Length parameter, with the value for the second Length parameter automatically updated to match.

Input rules can still be utilized to control parameters in the form. For example, Input rules can be set to read-only, visible or invisible, or to deviate from the default form label.

The parameter label in the Form block is a static label and is unaffected by label changes made in the Input rules.

  1. In Input rules, update the Stud Spacing label to read "Spacing for Studs". Click Update form to add the label change to the form.
  2. Switch to the Form rules to see that the Stud_Spacing label in the Form block remains unchanged.
  • On the left, the Input rules with the updated label text, and on the right, the Form rules, with the label unchanged.

Parameter labels in the Form block are also used as the column headers in the existing variant tables.

Additionally, the Input rule code blocks can remain in the code string even if a parameter is removed from the Form block.

In summary, Form code blocks allow for increased control over the frame layout, via grouping and labeling, while preserving modification capabilities within Input rules.