File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,13 @@ public static partial class Query
37
37
[ Output ( "colour" , "True if the Revit parameter is a colour, otherwise false." ) ]
38
38
public static bool IsColourParameter ( this Parameter parameter )
39
39
{
40
- if ( parameter ? . StorageType != StorageType . Integer || parameter ? . AsValueString ( ) != null || ! parameter . HasValue )
40
+ if ( parameter ? . StorageType != StorageType . Integer )
41
41
return false ;
42
42
43
43
#if REVIT2021
44
- return parameter . Definition . ParameterGroup == BuiltInParameterGroup . PG_GRAPHICS ;
44
+ return parameter . Definition . ParameterGroup == BuiltInParameterGroup . PG_GRAPHICS && parameter . HasValue && parameter . AsValueString ( ) == null ;
45
45
#else
46
- return parameter . Definition . GetGroupTypeId ( ) == Autodesk . Revit . DB . GroupTypeId . Graphics ;
46
+ return parameter . Definition . GetGroupTypeId ( ) == Autodesk . Revit . DB . GroupTypeId . Graphics && parameter . HasValue && parameter . AsValueString ( ) == null ;
47
47
#endif
48
48
}
49
49
You can’t perform that action at this time.
0 commit comments