Leave ?s in multi-parameter tag

Leave ?s in multi-parameter tag

Anonymous
Not applicable
792 Views
4 Replies
Message 1 of 5

Leave ?s in multi-parameter tag

Anonymous
Not applicable

I have a multi-parameter tag that, among other things, contains the Insulation Type and Insulation Thickness of a pipe, consecutively. Since the latter is a number, if there is no insulation, it will show up as 0 in the tag. Since the former is a system parameter, if there is no insulation, it will show up blank in the tag.

 

To no avail, I've tried Calculated Value formulas to get the Insulation Thickness to disappear if there is no insulation. At this point, I don't care if the tag hides the Insulation Thickness, or shows the Insulation Type as a "?", but I need both to show up, or neither. The ideal fix would just be a checkbox next to each parameter that says "hide if N/A" or something like that.

 

Any bright ideas? Can it be accomplished with Shared Parameters?

0 Likes
Accepted solutions (1)
793 Views
4 Replies
Replies (4)
Message 2 of 5

L.Maas
Mentor
Mentor

Nope, not possible. Tags just read values from the object. 

So to get rid of the 0 value you would have to delete the tag or replace it with a tag that does not read that specific value. (A Dynamo script might help in automation of this)

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 3 of 5

Anonymous
Not applicable
I'm willing to concede there is no way to turn the 0 into a blank (for the ins. thickness), but is there any way to turn the blank into an "N/A" (for the ins. type)?
0 Likes
Message 4 of 5

christian.riley
Autodesk Support
Autodesk Support

@Anonymous

This could be possible with a set of crafty formulas.

I believe the issue is that you are attempting to use the out of the box tag which is meant to read a specific value, then trying to get that parameter to be a formula. The best option would be to create a new tag, with a new set of parameters specifically built for this task.

IE:

Create a parameter that states "Insulation Thickness"
Create a formula in that parameter that utilizes a series of if/then statements that would say "If the thickness is zero report with N/A, if it is greater than zero place the number".

Please keep in mind this Formula would become very convoluted, as it would have to be an alphanumeric paramter instead of a number parameter, this means that you can't simply have it report what it is if it's not zero, you would have to build a chain of if/thens with all of your common sizes of insulation thickness.

Use Formulas in the Family Editor | Autodesk Knowledge Network

Please note the link to the syntax as well as the examples

Please let me know if this helps in any way or if this resolved your question, make sure to hit the Solution button below.




Christian Riley
Technical Support Specialist
Message 5 of 5

Anonymous
Not applicable
Accepted solution

Thanks Christian. First, I am using a custom tag. The parameters and formulas within the label of that custom tag are what I'm trying to write.

 

Next, your advice actually put me on the path to explore shared parameters, which was unfruitful, but did lead me to an actual solution - one which is similar to what you proposed, except stupid simple. It should be noted that, while it does solve my specific problem of having the Type and Thickness both report as something, whether or not they exist, this does not solve the global issue of being able to choose whether or not unused parameters report as "?" or blank, in multi-parameter labels. Here's the answer:

Custom Insulation Tag.PNG

In the Edit Label Window, you have to create a Calculated Value formula that reads the Insulation Thickness and assigns a value to the Insulation Type, based on its result.

 

The reason this is so crucial is because if there is no insulation, your formula can't read if(Insulation Type="", "N/A", Insulation Type), because Revit doesn't interpret blank strings of text as empty results, like other programs (Excel) do. It will return a Boolean error. Likewise, if you try to make the Insulation Thickness disappear with the formula if(Insulation Thickness=0,"",Insulation Thickness), you will get the same Boolean error, because the 2 outputs of your conditional - the "" (text) and the Insulation Thickness (number) - are 2 different data Types

 

You have to feed Revit a conditional that will always exist, hence the Thickness. The Insulation Thickness will always report as an integer, zero in the case of non-existent insulation. Use that to define your conditional statement, report both outputs as text, and you're golden.

0 Likes