Replacing 0.000m² value with Null

Hello all,

I’m looking to search a category of ‘Rooms’, then based around the parameter of ‘Required Area’, filter out the values hitting ‘zero’ (0.000m²) and replace those values with a non-value, or null value. The ‘Required Area’ is a calculated value that is based off what is real in the model vs. what is required by the employer.

It has an added complexity of being a Calculated Value, which by default until we input ‘Employers Required Area’ is ‘null’, but as soon as you put anything in it populates with a number. If you remove said ‘Employers Required Area’, the value reverts to 0.000m² and not null.

Am I approaching it correctly? I’m a little stumped.


I have had issues with trying to set a null value. But here is a workflow below that will get the indices of your (0.000m²) value and replace them. Either with blank or null.(Someone else may have to weigh in on the feasibility of the null value.)


Ah brilliant, thanks John. I’ll have a look at that :slight_smile:

As a quick follow up, is the ‘null’ value equivalent to the greyed out (Not ticked or unticked) parameter prior to selection in a yes/no in Revit?

I am not too sure, I added a yes/no project parameter to try it out. It appears to be a blank string?




That would make sense I guess. If that’s the case I’m after a blank string, rather than a null.

Is your modifiable parameter an area or string?

It’s an area. I’ve attach the file of what I’m trying to do.

Add Empty String to Area


So it’s an Area, not a string. Most likely this is the issue :smiley: My original thought process was going down the null value path as I originally thought an empty string wouldn’t cut it… but tried anyway.

It sounds like you are trying to revert it back to the original value that is created when the parameter is. In Revit if I add an area and attempt to delete it, I receive this error. The API gurus may have to weigh in on this one. You could create a new parameter (parameter2) and filter out the 0.00 values then set the modified ones from parameter1 (original). Then discard the original.

It seems like some of the users in the project edited the value then changed there mind? :D



Exactly! And yeah, mind’s are changed far to often here… more’s the pity.

Any ideas API gurus :smiley: ?

Even somewhere to look would rock :stuck_out_tongue:

Is it a ‘null’ value (Doesn’t look like it) ?

Is it an empty string (Doesn’t look like it) ?

What would this ‘pre-selected’ yes/no parameter be called?



I posted similar question and this is not possible now.

Would be amazing if anyone could log a case at Revit to allow this. This is very important functionality!


I think such types could be modified to System.Nullable in API?

Whole MEP world is awaiting this… as those zeros are messing up colouring scheme and more items…

another idea I have is Dynamo script that remove parameter from project and insert again but all coloring schemes need to be apply again. I log a ticket at Autodesk but is quite. Please hep me to get it momentum on that :slight_smile:

  1. I added it to the wish list item CF-3558 [API wish: create colouring scheme with full access to control RGB colors] to make the development