Share

ModelParameters.AddByExpression Method

Parent Object: ModelParameters

Description

Method that creates a new model parameter given an expression.

Syntax

ModelParameters.AddByExpression( Expression As String, UnitsSpecifier As Variant, [Name] As String ) As ModelParameter

Parameters

Name Type Description
Expression String Input String value that specifies the equation for the parameter. This string is evaluated the same way as strings entered in any of the Inventor dialogs are evaluated. For example 'x + 3 in / 2 cm' is a valid string for input.
UnitsSpecifier Variant Input value that specifies the type of unit the parameter is. The units can be specified using either a string defining a valid unit or an item from the UnitsTypeEnum. If the equation references existing parameters, this unit type must be consistent with the unit type defined by the equation, otherwise an error will occur.
Name String Optional input String value that specifies the name for the parameter. The name must be unique with respect to all other parameters in this document. If a unique name is not specified an error will occur. If not specified, a unique name generated by Inventor is assigned to the parameter.

This is an optional argument whose default value is "".

Version

Introduced in version 10

Was this information helpful?