Function ProMaterialPropertySet
Description
Create or set a material property value.
The following combinations of arguments are permitted for p_value and p_units: p_value p_units Is the property created in the material already? Result Any value Appropriate units for this property, or NULL, if the property is unitless NO Property is created with the given units and value. Any value NULL NO Property is created with the given value using the appropriate units from the owner model. Any value Current units for this property, or NULL, if the property is unitless YES Property value is changed to the new value. Any value NULL YES Property value is changed to the new value (which is interpreted as being in the units from the owner model) The current value New appropriate units YES Property units are changed but the value is interpreted as being for the new units. NULL New appropriate units YES Property units are changed and the current value is converted to the new units.
Replacement in Object TOOLKIT: | |
Synopsis
| ProMaterialPropertySet |
| ( /* (In) The material. */ /* (In) The material property type. */ /* (In) The material property value. Can be NULL, see the table above. */ /* (In) The material property units. Can be NULL, see the table above. */ ) |
Returns
| The function succeeded. |
| One or more arguments is invalid. |
| This property cannot be created on the material (because other properties assigned to the material already do not permit it). |
| The new value for the property lies outside the permitted ranges for the property. |
| The new units for the property are not correct for this property type. |
| Cannot change the value of the property because it is driven by a parameter, relation or function. |
| The value type is incorrect for the property. |
Sample Code References
User Guide References