Parameter Values
Functions introduced:
These three functions are utilities to help you manipulate the ProParamvalue structure. They do not directly affect any parameter in Creo Parametric .
The function
ProParamvalueSet() sets the value type of a
ProParamvalue structure, and writes a value of that type to the object.
The function
ProParamvalueTypeGet() provides the type of a
ProParamvalue object.
The function
ProParamvalueValueGet() reads a value of the specified type from a
ProParamvalue structure.
The function
ProParameterIsListValue() provides the information if the parameter value type is a list or not. The output argument
is_list is a
ProBoolean and returns
PRO_B_TRUE, if the specified parameter value type is a list, if not it returns
PRO_B_FALSE.
Use the function
ProParameterListValueGet() to get the list values and units for the specified parameter handle. The function returns the following output arguments:
• proval—ProArray of ProParamvalue. The values are assumed to be in the units specified by the units argument (when the units argument is not NULL) or in the units of the owner model, when argument units is NULL.
• units—The units in which the values are expressed. Pass NULL if units is not required. If none found, an empty string will be returned.
Use the function
ProParameterListValueSet() to set the list values for the specified
ProParameter handle with the given units. The input arguments are as follows:
• param—Specify the handle to the parameter.
• proval—Specify the ProArray of ProParamvalue. The values are assumed to be in the units specified by the units argument (when the units argument is not NULL) or in the units of the owner model, when argument units is NULL.
• units—Specify the new units. The units must be the same quantity type as the units of the parameter (i.e. if the units are "inch", a value can be expressed in "cm"). Can be NULL. If you pass NULL, the function will assume the units of the owner model.
Use the function
ProParameterListTypeSet() to set the value type as list for the specified parameter.
Use the function
ProParameterEnumeratedSet() to set a parameter as enumerated(parameter restricted by a list of values) and to provide a list of allowed values. The input arguments are:
• param—Handle to the parameter.
• valid_values—Specify the valid values that should be assigned to this parameter. Cannot be NULL.
• p_default—The default (current) value for the parameter.
Use the function
ProParameterRangeSet() to identify the value to be restricted to a certain range for the specified parameter. The input arguments are as follows:
• param—Handle to the parameter.
• minimum —The minimum value for this parameter that is specified using the object ProParamLimit.
• maximum —The maximum value for this parameter that is specified using the object ProParamLimit.
• p_default—The default (current) value for the parameter.