GetScalarProperty
Returns the value for the material property, if the property is available as a scalar. The name of the property is specified by the argument string.
Calling convention:
bool GetScalarPropery (const char* name)
Argument | Data type | Description |
---|---|---|
name | const char* | The name of the given material. |
For the full list of supported arguments, see HasProperty.
You can find a definition of this function in theCaeUtils_Exp_IMaterial.hxx header file.
The following example shows how to access the dynamic viscosity through the
GetScalarProperty
method.
double fluidViscosity = 0.0;
const IScalarValue* pScalar = pMaterial->GetScalarProperty("DynamicVisc");
if (pScalar)
fluidViscosity = pScalar->GetValue();