[英]Statement issue in revit api
I am having a problem with the following statement. 我对以下陈述有疑问。 I was hoping some could help me?
我希望有人能帮助我吗?
if (parameter != null && parameter.StorageType == 2 && parameter.HasValue) if(参数!=空&& parameter.StorageType == 2 && parameter.HasValue)
Try here for some information on the Parameter.StorageType values: http://spiderinnet.typepad.com/blog/2011/04/parameter-of-revit-api-5-parametertype-and-storagetype.html 请尝试在此处获取有关Parameter.StorageType值的一些信息: http : //spiderinnet.typepad.com/blog/2011/04/parameter-of-revit-api-5-parametertype-and-storagetype.html
You shouldn't really use a "magic" number like 2
here, instead, it should probably be 您实际上不应该在这里使用像
2
这样的“魔术”数字,相反,它应该是
parameter.StorageType == `StorageType.Double`
Basically, what the line is doing, is making sure, that the parameter 基本上,生产线正在做的是确保参数
double
, a floating point number double
,一个浮点数 Read the developer documentation on how the parameters work. 阅读有关参数如何工作的开发人员文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.