Revit MEP Forum
Welcome to Autodesk’s Revit MEP Forums. Share your knowledge, ask questions, and explore popular Revit MEP topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Conditional Formatting - Comparing parameter A to parameter B

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
rmartinez-vazquez
330 Views, 10 Replies

Conditional Formatting - Comparing parameter A to parameter B

I wanted to know it is possible to compare parameters to each other in schedules and have it be conditionally formatted to show you that a value is less than or greater than to another parameter. Something similar to excels conditional formatting as shown below. 

 

Image from Excel with conditional formatting. 

rmartinezvazquez_0-1712546879033.png

 

Labels (2)
10 REPLIES 10
Message 2 of 11

If I remember correctly you can't directly compare two parameters to apply a conditional format but you can create a calculated parameter and use a test formula to compare the two values and then apply a format to the test parameter.

iainsavage_1-1712574608632.png

 

iainsavage_0-1712574563594.png

 

This is the help topic for conditional formatting:

https://help.autodesk.com/view/RVT/2024/ENU/?guid=GUID-AA4D5759-AF09-466C-85A1-F0D1F8299584

Message 3 of 11
iainsavage
in reply to: iainsavage

I went back to an old project to refresh my memory and found a slight improvement.

You can use a different column from the formatted column as the test so in my example you can use the test column to determine the conditional format for the Actual Supply Airflow:

iainsavage_0-1712575558300.png

Then you can make the test column a hidden field:

iainsavage_1-1712575613658.png

Then you get something like this:

iainsavage_2-1712575657408.png

 

Message 4 of 11

Ahhhhhh, ok, so there's a bit a trickery and manipulation to achieve this. Let me give this a shot. Thanks for the response. 

Message 5 of 11

I got this working. Thank you @iainsavage.

 

I am now attempting this with a text parameter but I get this message
ID Instance and Mark are both text parameters. 

rmartinezvazquez_2-1712585630497.png

 

Attempt 1

rmartinezvazquez_0-1712585440755.png

Attempt 2

rmartinezvazquez_1-1712585488071.png

 

Message 6 of 11

I don't think you can use Boolean comparisons with text values.

If you want the Mark value to equal the ID Instance value or vice versa then you would probably be better using Dynamo to get the value of one parameter and then apply that value to the other parameter.

Or I think you can use the Reordering tool in DiRoots One addon to do that with a rule based option (need to test that theory or ask them).

For most parameters, in the family you can use a formula such as Parameter 1 = Parameter 2 but I don't think you can use that method with Mark.

Message 7 of 11

Thank you for the info. It's much appreciated. 

Message 8 of 11

I tested the DiRoots Reorder tool to transfer one parameter value to another.

It almost works. It transfers the value but it always adds a number value depending on the starting value and step that you apply. A workaround is to use a step value of zero so all entries will have the same starting number then a dash then the transferred value. Use a starting number which you can easily find to edit afterwards (in my simple example I used 0 but you could use something unique like 9999 or something).

iainsavage_0-1712595327447.png

You can however then export to a speadsheet using DiRoots Sheetlink (or DBLink or similar?), then use Find & Replace to remove the prefix, then re-import back to the project.

iainsavage_1-1712597260086.png

Maybe that process could be simplified - if you email the help team at DiRoots (maybe send them a link to this post as well) they are usually very responsive and could maybe suggest ways of simplifying the process using their free products.

I only suggest this method if you are not familiar with using Dynamo - Dynamo could do it in a single script.

Message 9 of 11

this is an interesting approach. I have heard of DiRoots but not used it yet. I'll dig into to this and see where it leads me. Thank you again.

Message 10 of 11

Here's a Dynamo script which does what you want. It was pretty easy to construct.

You need to:

  • add you ID Instance parameter to the project (either as a Shared Parameter or as a Project Parameter) and associate it with the required family categories OR
  • add the Shared Parameter to your families and reload them
  • Choose the correct category in the leftmost "Categories" node in the script
  • Run the script (either manual or automatic)

 

iainsavage_0-1712610033362.png

 

Result:

iainsavage_1-1712610251889.png

 

If you need to do it for multiple family categories you can either run it several times, changing the category in the leftmost node, or the script can be edited to run simultaneously for several categories.

 

Message 11 of 11

Thanks for the extra info. I just started exploring Dynamo so this will be a nice implementation to have. Thanks @iainsavage 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups


Autodesk Design & Make Report