API 文件集 > Parameters and relations > Object ProParameter > Function ProParameterValueWithUnitsSet
Function ProParameterValueWithUnitsSet
Description
Sets the value given with units of an existing ProParameter.
Replacement in Object TOOLKIT:
Synopsis
#include <ProParameter.h>
ProParameterValueWithUnitsSet
(
/* (In)
The handle of the parameter to set
*/
/* (In)
The new value. The value assumed to be in the units specified by units argument (when the units argument is not NULL) or in the units of the owner model, when argument units is NULL.
*/
/* (In)
The new units. The units must be the same quantity type as the parameter's units (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.
*/
)
Returns
The function successfully set the value and units.
Model is in read-only state.
The owner was not found.
One or more arguments was invalid.
The unit type provided does not match the units of the parameter.
The parameter was not found, or the function could not perform the action.
Sample Code References
User Guide References
這是否有幫助?