Layered "IF" Statements for Generic Annotation Family

Layered "IF" Statements for Generic Annotation Family

aszczawinski
Enthusiast Enthusiast
1,119 Views
4 Replies
Message 1 of 5

Layered "IF" Statements for Generic Annotation Family

aszczawinski
Enthusiast
Enthusiast

Hello everyone,

 

I am working on standardizing my company's Electrical families, which include Generic Annotation families for our Single Line Diagram (or One Line Diagram, Riser Diagram, etc) symbols. Here is my dilemma:

I am working on our transformer family. Right now, there are (4) sub-families (TRANSFORMER - DEMO, TRANSFORMER - NEW, TRANSFORMER - EXISTING TO REMAIN, TRANSFORMER - EXISTING TO BE RELOCATED) within the main Transformer family called "Single-Line Diagram - Transformer). For each of the (4) sub-families, I updated the "Object Styles" for the appropriate "Line Project" and "Line Pattern" prior to loading the sub-families within the main family. I've set up Yes/No Family Parameters that are Type-Based for each of the (4) sub-families (main transformer family has (4) types, (1) for each sub-family mentioned above). Last piece of background information is I've added a Yes/No Family Parameter that is Instance-Based for the text label associated with the family to essentially be on the left side or the right side of the symbol.

 

Here is the challenge I am running in to. I want to keep the Yes/No Instance-Based Family Parameter for the text on the left and right side, but I want to create (8) unique labels that are Type-Based. They are the following:

 

1. Text - Left - New

2. Text - Left - Demo

3. Text - Left - Existing to Remain

4. Text - Left - Existing to be Relocated

5. Text - Right - New

6. Text - Right - Demo

7. Text - Right - Existing to Remain

8. Text - Right - Existing to be Relocated

 

Each label utilizes shared parameters that my company has defined for our Generic Annotation families. One of those is called "SLD_XFMR_TYPE" where we want to include (E) for Existing to Remain, (ER) for Existing to be Relocated and (R) for Demo for the instances mentioned above.

 

Can someone confirm if this is possible without creating a new family type for each instance?

 

@fabiosato 

 

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

tim.ingle
Enthusiast
Enthusiast

Hi @aszczawinski, your scenario would be possible without creating multiple types for the text orientation for each phase (New, Existing to Remain, Existing to be Relocated, and Demo). Please see the attached family for an example.

You would need to create (2) labels in your family (one for the left, one for the right). These labels would contain all necessary company shared parameters (including SLD_XFMR_TYPE). The first parameter you would add to the label would be a Family Parameter or Shared Parameter (Text type). This first text parameter would have a formula equal to or similar to:


if(Existing to Remain, "(E)", if(Existing to be Relocated, "(ER)", if(Demo, "(R)", "")))

 

*The formula above assumes you would have (3) Yes/No parameters to control phase state of the single line transformer.

This formula would allow you to use only (2) labels and only (1) parameter that you need to reference depending on the installed state of your single line reference for the transformer.

You would then need (2) parameters to control which label is visible. In the example attached, I used "Text Left" and "Text Right", where "Text Left" has a formula of: not(Text Right).
This allows the user to only check one box for label control.

0 Likes
Message 3 of 5

aszczawinski
Enthusiast
Enthusiast

Hey @tim.ingle,

 

Thank you for providing your family below. I was able to get the family to work as intended except for one thing. For the condition "NEW", since it does not have a prefix of (E), (ER) or (R), I can't include the text "XFMR" in that line for "Phase Text". Is there a workaround? I can't change the "then" part of the IF statement to be "XFMR" because it'll read "XFMR XFMR".  Snipit below as reference:

 

aszczawinski_0-1682518275577.png

 

aszczawinski_1-1682518308937.png

 

 

0 Likes
Message 4 of 5

tim.ingle
Enthusiast
Enthusiast
Accepted solution

Hi @aszczawinski, you would still be able to accomplish this, but you would need another parameter to display the "XFMR" value in the Label. Your Label would consist of:
     1. Phase Text parameter

     2. XFMR Text parameter

     3. Additional parameters as needed.

 

The formula I provided in my last post would work with this revised parameter (assuming that a value of "" or nothing is used when the New type is selected). I've included an updated family for reference.

Message 5 of 5

aszczawinski
Enthusiast
Enthusiast

This ended up working - thank you for walking me through!