Work with parameters in models

When you add a dimension or other measurement to a model, that value is established as a parameter for the model. Use parameters in equations to derive other parameters or define user parameters that you call by name when entering values.

Dimensions that are calculated by an equation are preceded by the prefix fx.

Note: Dimensions constrain sketch size. If a dimension overconstrains the sketch, it can be saved as a reference parameter.

Show Me how to use parameters

Define or change parameter names and values in edit boxes

When you enter a dimension or other value in an edit box, the value is defined as a parameter for the model and assigned a default name, such as d0, d1, or d2. You can override the default and specify a parameter name when the value is entered in the edit box.

For example, if you want to extrude a sketch profile to a height of 2 mm, enter 2 mm in the distance edit box of the Extrude dialog box. When the extrusion command is executed, a default parameter, such as d0, is created and assigned the value of 2 mm. However, if instead you enter HT = 2 mm, Inventor parses the expression and creates the parameter HT with the assigned value of 2 mm. In this manner, you establish meaningful parameter names for reference and later use.

To change the parameter name or value, use the edit box in a similar manner. Let us say that you want to change the parameter name from HT to HGHT in the previous example. You edit the extrusion feature and enter HGHT=2 mm in the distance edit box. The HT parameter is replaced by the HGHT parameter when the command is executed.

Change name or value of parameter with Parameters command

When you enter a dimension or other value in an edit box, the value is defined as a parameter for the model and assigned a default name, such as d0, d1, or d2. You can use the Parameters command to rename an existing parameter and change the parameter value. You can also change the value of a parameter by changing its equations .

  1. On the ribbon, click Manage tab Parameters panel Parameters .
  2. In the Parameters dialog box, locate the parameter to change.
  3. To change the Parameter Name, Equation, or Comment, click in the corresponding box to select the existing value and then enter the new value.
  4. Press Enter to save the change.
  5. To update the model, click Update on the Quick Access toolbar.
Note: Only normal dimensions can be edited. To convert driven (reference) dimensions to normal dimensions, select the Style box, and then click Normal. To avoid overconstraining the sketch, you might need to convert other dimensions to driven.
Tip: You can also change the value of an existing parameter by editing the sketch dimension or the feature.

Add numeric user parameter

You can define numeric parameters, for values such as yield strength, and specify them by name to set the values of dimensions or other measurements in a model.

  1. On the ribbon, click Manage tab Parameters panel Parameters .
  2. In the Parameters dialog box, click Add Numeric from the drop-down menu to add a numeric parameter row to the User Parameters table.
  3. Click in the boxes to enter the Parameter Name, Units, and Equation .

    In the Unit box, the Unit Type dialog box opens, listing all available unit types. Click to expand the browser tree and select the desired type.

  4. Select the Key check box if the parameter is a key parameter.
  5. If desired, enter a Comment.
Tip: If you use the same parameters in many parts, create a template file that contains the parameters. Save the template in the Templates folder to use when creating new part files.

Add text user parameter

You can define text parameters, such as colors or other descriptive text strings, and specify them by name to set values in a model. Keep in mind, however, that text parameters do not support expressions.

  1. On the ribbon, click Manage tab Parameters panel Parameters .
  2. In the Parameters dialog box, click Add Text to add a text parameter row to the User Parameters table.
  3. Click in the Parameter Name box to enter the name.
  4. Click in the Equation box to add the value for the parameter.
  5. Select the Key check box if the parameter is a key parameter.
  6. If desired, enter a Comment.
Tip: If you use the same parameters in many parts, create a template file that contains the parameters. Save the template in the Templates folder to use when creating new part files.

Add true/false user parameter

You can define true/false parameters, and specify them by name, to set true or false conditions in a model. Keep in mind, however, that true/false parameters do not support expressions.

  1. On the ribbon, click Manage tab Parameters panel Parameters .
  2. In the Parameters dialog box, click Add True/False from the drop-down menu to add a Boolean parameter row to the User Parameters table.
  3. Click in the Parameter Name box to enter the name.
  4. If necessary, click in the Equation box to change the value from True to False.
  5. Select the Key check box if the parameter is a key parameter.
  6. If desired, enter a Comment.
Tip: If you use the same parameters in many parts, create a template file that contains the parameters. Save the template in the Templates folder to use when creating new part files.

Specify value list for parameter

You can define multiple values for a parameter; however, a parameter can only have one value at any time. The values are actually expressions, and so the value list items for numeric parameters can be actual parameter expressions.

  1. In the Parameters dialog box, right-click anywhere on the row of the parameter, and select Make Multi-Value to open the Value List Editor dialog box.
  2. Enter the values in the Add New Item(s) area, with each value on a separate line. Use the Enter key to add new lines as necessary.
  3. Click Add to move the values to the Value field.
  4. Click OK.
Note: You cannot create a multi-value list for a Boolean parameter.

Choose different value for parameter with multiple values

  1. In the Parameters dialog box, click on the Equation box of the parameter to display the drop-down selection arrow.
  2. Click on the arrow to display the list of values.

    If a custom value has also been defined for the parameter, it is included in the list.

  3. Select a new value from the list.

Edit multi-value list of parameter

  1. In the Parameters dialog box, right-click on the Equation box of the parameter, and select Edit Multi-Value List to display the Value List Editor dialog box.
  2. Edit the list of values.
    • Enter new values in the Add New Item(s) field, and click Add to move the new values to the Value field, or click Clear to erase your entries and start over.
    • Select a value in the Value field, and click Delete Selected Item(s) to remove a value from the multi-value list.
  3. Click OK when finished.

Use custom value for multi-value parameter

You can add a custom value to a multi-value parameter if you have. The custom value is not part of the value list already defined for the parameter, but it is available for selection from the Equation field of the parameter. You must enable the use of a custom value for the parameter before you can add the value.

  1. In the Parameters dialog box, right-click on the Equation box of the parameter, and select Edit Multi-Value List to display the Value List Editor dialog box.
  2. Select Allow custom values.
  3. Click OK to close the Value List Editor.
  4. Click on the arrow in the Equation box of the parameter to display the list of values, and select the new choice <Custom Value...>.
  5. Overwrite the value in the Equation box, and press Enter.

The custom value is now a member of the list of available values in the Equation box, and it is the currently selected value. However, the custom value is not included in the multi-value list displayed in the Value List Editor for that parameter.

You can only add one custom value to a multi-value parameter. If you attempt to add another custom value, the previous custom value is overwritten.

To remove the custom value, change the value to one of the other values, then open the Value List Editor for the parameter and clear the checkbox for Allow custom values.

Specify compound units for numeric user parameters

  1. In the Parameters dialog box, click Add Numeric to add a new numeric user parameter.
  2. Click in the Unit column to open the Unit Type dialog box.
  3. Expand groups as necessary and click to select a unit type.
  4. In the Unit Specification box, selected units are added to the box. To build compound unit specifications, such as in/sec, separate the individual units with the appropriate sign of operation, such as multiplication, division, or exponentiation.

    If you prefer, you can enter units directly in the Unit Specification box.

  5. Click OK to add the unit of measurement in the Unit column of the parameter.

Filter set of displayed parameters

You can choose which parameters to include for display in the Parameters dialog box, based on certain criteria.

To filter the display of parameters, select a filter from the Filters list.

You can also expand or collapse the Model Parameters list and the User Parameters list to hide or display those parameters.

Display parameters list in reduced mode

You can reduce the display of the Parameters dialog box to include fewer columns and buttons.

To reduce the display, click << Less at the bottom of the dialog box. The window of the dialog box is resized accordingly. The dialog box continues to display in reduced mode until you change it back to full display.

To return to full display, click More >> at the bottom of the dialog box.

Define parameters in spreadsheet and link to open document

  1. On the ribbon, click Manage tab Parameters panel Parameters .
  2. In the Parameters dialog box, click Link to find and select the Microsoft Excel (.xls) file.
  3. Specify the starting cell in the spreadsheet for the parameters. Do not include any column or row headings or other content from the spreadsheet.
  4. Specify whether to embed or link the spreadsheet.

When you link to or embed a spreadsheet, a table showing the parameters is added to the Parameters dialog box. You cannot edit the parameters in the spreadsheet from the Parameters dialog box. Open the file in Microsoft Excel to make changes.

Export model and user parameters to component properties

  1. On the ribbon, click Manage tab Parameters panel Parameters .
  2. In the Parameters dialog box, click the check box next to the parameter you want to export in the Export Parameters column.
    • Right-click in the parameter row and select Custom Property Format to set the format for the exported parameter.
  3. Click Done.
  4. Click iPropertiesCustom tab to verify that the parameter is listed.
  5. Click OK.

Display exported parameters in bill of material and parts list

  1. In the Bill of Materials or Parts List dialog boxes, click the Column Chooser.
  2. Select the Custom Properties field.
  3. From the Available Properties field select the parameters that you want to appear in the bill of material or parts list.
  4. Click Done. The selected parameter appears as a new column.

Delete user parameter

In the Parameters dialog box, right-click anywhere on the parameter row, and select Delete Parameter.

You can create custom parameter groups using the API.