Hide Angle Parameter from tag when Angle = 0°

Hide Angle Parameter from tag when Angle = 0°

cristinaroldan
Contributor Contributor
2,243 Views
9 Replies
Message 1 of 10

Hide Angle Parameter from tag when Angle = 0°

cristinaroldan
Contributor
Contributor

Hi there,

 

I was wondering what is the best way to do this:

 

I have a tag which includes three different parameters, one of them being an Angle parameter. The item that I am tagging not always has value for the Angle parameter so by default the tag shows 0°. I would like the 0° to not be visible but the rest of the angles should show up in the tag.

 

Since the tag has other parameters as part of it, I would like to keep the Angle parameter as part of the tag because that way the information adjusted itself to be aligned correctly regardless of the length of the information shown.

 

Also, I know I could build two different types of tags where one will be applied to the items with Angle=0° and the other type to Angle>0°. This is option will work but will make my family tag double the types amount which is not to be ignored.

 

Looking forward to hear your ideas.

Thanks!

0 Likes
Accepted solutions (1)
2,244 Views
9 Replies
Replies (9)
Message 2 of 10

barthbradley
Consultant
Consultant

@cristinaroldan wrote:

 This is option will work but will make my family tag double the types amount which is not to be ignored.

 


 

I don't known what you mean by the above statement. But, one Tag Family with 2 Family Types; one with Angle Label visible and one  without Angle Label visible, is how I would do it. 

0 Likes
Message 3 of 10

cristinaroldan
Contributor
Contributor

Thanks for your response.

 

I meant that the tag family already have a few types. All of the types have the angle parameter on it but the labels text size and graphics are different for each type since the drawings we are using the tags at have different scale, detail level, etc. So for each one of these types, I will have to create another type with no angle parameter on it. Hope this makes more sense 😛

0 Likes
Message 4 of 10

barthbradley
Consultant
Consultant

The original question was how to create a Tag where the "Angle" Label/Value would not be shown if the "Angle" Value is "0".  Did I misread?  

0 Likes
Message 5 of 10

cristinaroldan
Contributor
Contributor

Not at all! that was my question 🙂 but I wanted to see if there was any other way of doing instead of creating new tag types.

Message 6 of 10

barthbradley
Consultant
Consultant

Out of curiosity, what is the Tag Category? What is it Tagging?  

0 Likes
Message 7 of 10

cristinaroldan
Contributor
Contributor

It is a curtain panel tag.

0 Likes
Message 8 of 10

Anonymous
Not applicable

Can you send the files here? the TAG and the family your using it in?

0 Likes
Message 9 of 10

lucdoucet_msdl
Advisor
Advisor

@cristinaroldan 

 

You can set up a visibility parameter for the label in the tag that reports the angle parameter with an if statement such that for angle=0° the label is not visible. Unfortunately this would hide the label whether the parameter is empty (null value) or equal to 0.

 

Unfortunately, I don't think there is a Revit logical statement that can distinguish between a null value and a zero value. Here is a Revit Idea submission which discusses how to do this for schedules and filters but comes to the conclusion that it is not available for logical operations:

Yes/No Null Value Equivalent to No in Conditional Statement

-luc

0 Likes
Message 10 of 10

TripleM-Dev.net
Advisor
Advisor
Accepted solution

Hi,

 

Something like below, 1 TagType different appearances:

I added multiple fields to display the options.

 

TagType_differentLabels.png

 

I've added 3 parameters to the CW panels, below a breakdown of what the Tag does:

A: Reads the Shared text parameter "testvalue1"

B: Reads the Shared length parameter "Testvalue1"

C: Reads the Shared angle parameter "TestAngle"

D. Formula in the Label, as text datatype, Evals 2 angle values (90 and 120), and displays the angle value as text or a empty string.

(If this post is related to one of the previous posts, you only needed to eval 2 angles, correct...?)

E: Formula in the Label, as angle datatype, for this eval >0, if so then display 'TestAngle' else a unused empty shared angle parameter. For this I added the shared angle parameter 'TestAngleEmpty', make sure it's not added in any family or in the project, it MUST never be used else this formula won't work as designed!. That is that we actually don't want Revit to find the shared parameter and thus display "?", see below how to get rid of the visible "?" value.

 

Below you can see the Tag Family label with the 2 formulas.

TagFormulas.png

For this to display properly (= to not show a "?" for the angle formulas), the Label with the formula needs to also contain a values that exists. That's how the "?" can be avoided.

Another way to avoid the  "?" is to add a (visible) detailline or something alike to the tag family.

 

I hope it's clear how the Tag is built?

I've added the sample project file so you can see/test for yourself.

 

- Michel

0 Likes