createParameter()

This method creates a new parameter with specified attributes. All arguments for this parameter are optional.

This page discusses:

Arguments

  • role: Role of the new parameter. Values are INPUT, OUTPUT, and UNKNOWN. Default value for this attribute is UNKNOWN
  • dataType: Type of data to be added to the new parameter if it does not contain string data. Values are INTEGER, REAL, and BOOLEAN. The default data type is REAL
  • structure: Structure of the data in the new parameter. Values are SCALAR and ARRAY. The default data structure is SCALAR
  • priority: Initial rough weight, if weight is not defined, with a priority of 5 corresponding to a weight of 1 and a priority of 1 corresponding to weight of 5. priority must be an integer between 0 and 5, with a value of 0 corresponding to a Must-Have parameter with the same weight as a priority 1 parameter. The value of priority is not used for weighting if the weight attribute has been set. The default value for this attribute is 5.
  • weight: Parameter weight. This is used in scoring calculations, providing more specificity than priority. Weight must be a number between 1 and 5, or have a value of -1. A value of -1 represents that the weight is not set and that the weighting should default to use a value derived from the priority. The default value for this attribute is -1.
  • dimensions: Dimensions of the parameter if it is of type ARRAY.
  • unit: Unit of the parameter, such as miles or kg.
  • notes: Additional notes on the parameter.
  • displayName: Short name to be displayed for the parameter. name will be used if displayName is not defined.
  • name: Full name of the parameter.
  • parentId: ID of the group containing the parameter. The parameter will be directly under the root group for the case if this is not defined.

Return Value

Returns dictionary-like object representing the newly created parameter, including an auto-generated ID field used to identify the parameter in many other methods.