I am having a problem with the following statement. I was hoping some could help me?
if (parameter != null && parameter.StorageType == 2 && parameter.HasValue)
I am having a problem with the following statement. I was hoping some could help me?
if (parameter != null && 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
You shouldn't really use a "magic" number like 2
here, instead, it should probably be
parameter.StorageType == `StorageType.Double`
Basically, what the line is doing, is making sure, that the parameter
double
, a floating point numberRead the developer documentation on how the parameters work.