ParameterAsValueString Method |
Get the parameter value as a string with units.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic string AsValueString()
Public Function AsValueString As String
public:
String^ AsValueString()
member AsValueString : unit -> string
Return Value
StringThe string that represents the parameter value.
ExampleString ShowValueParameterInformation(Parameter attribute)
{
string paramValue = null;
switch (attribute.StorageType)
{
case StorageType.Integer:
if (SpecTypeId.Boolean.YesNo
== attribute.Definition.GetDataType())
{
paramValue = null;
}
else
{
paramValue = attribute.AsValueString();
}
break;
case StorageType.Double:
paramValue = attribute.AsValueString();
break;
default:
paramValue = null;
break;
}
return paramValue;
}
See Also