Discuss the API read Revit parameter values for th
2016-08-23
0 0 0
no vote
Other
Earn points
public static string ParameterToString(Parameter param)
{
string val = "none";
if (param == null)
{
return val;
}
// To get to the parameter value, we need to pause it depending on its storage type
switch (param. StorageType)
{
case StorageType.Double:
double dVal = param. AsDouble();
val = dVal.ToString();
break;
case StorageType.Integer:
int iVal = param. AsInteger();
val = iVal.ToString();
break;
case StorageType.String:
string sVal = param. AsString();
val = sVal;
break;
case StorageType.ElementId:
ElementId idVal = param. AsElementId();
val = idVal.IntegerValue.ToString();
break;
case StorageType.None:
break;
}
return val;
}
c#
api
参数
revit
读取
对象
详谈
Related Source Codes
No. 186: DX0110- Source code for community propert
0
0
no vote
No. 219: DX0149- Source code for community propert
0
0
no vote
Verification code identification
0
0
no vote
CSV data analysis tool
0
0
no vote
Source code of hospital medical record information
0
0
no vote
No comment