Make automatic sheet size text from sheet width and height parameters

Make automatic sheet size text from sheet width and height parameters

Anonymous
Not applicable
971 Views
5 Replies
Message 1 of 6

Make automatic sheet size text from sheet width and height parameters

Anonymous
Not applicable

I have made a title block (family) with different sheet sizes (family types) all good, but now i am trying to generate a sheet size text item (label?) ie, A1,A2,A3.... from the sheet width and sheet height title block family type parameters. I created a new parameter when in my title block family, called 'sheet size'. I then use an IF (AND (Sheet Width=420 mm, Sheet Height=297 mm), "A3", "NA") which successfully returns a value of A3 to the 'sheet size' text parameter in the family type. I want to nest this formula to return different sheet sizes for this parameter ie A2, A1.... Then i want to add this returned 'sheet size' text parameter value and have it appear on my title block depending on family type. Then i want to be able to change my family type in my project browser and have the correct sheet size display in my title block (family) based on the sheet size (family type). Any help would be good.  I am confused about the logic

0 Likes
972 Views
5 Replies
Replies (5)
Message 2 of 6

ines_m3WR2F
Community Visitor
Community Visitor

upp any help on this?

0 Likes
Message 3 of 6

Mike.FORM
Advisor
Advisor

you would want a nested "IF" statement that looks like this.

 

IF(and(Sheet Width=841mm, Sheet Height=594mm), "A1", IF(and(Sheet Width=594mm, Sheet Height=420mm), "A2", IF(and(Sheet Width=420mm, Sheet Height=297mm), "A3", IF(and(Sheet Width=297mm, Sheet Height=210mm), "A4", "N/A"))))

 

It is checking first for the A1 size, if it doesn't meet the criteria then it checks for the next size A2, and so on and then finally if it doesn't fit the criteria for any of the sizes it returns N/A.

0 Likes
Message 4 of 6

TripleM-Dev.net
Advisor
Advisor

Hi @ines_m3WR2F

 

For actually getting that Ax value on the titleblock, use a Generic Annotation family with a Text parameter.

Place that family in the TitleBlock family and link the "Calculated" value to the placed family's text parameter.

 

For the acual formula I use something more complex but better expandable and more options.

As we also use sheets in portret not only landscape.

 

So I first pass the Width / Height to Size_large and Size_small:

IsLandscape (yesNo parameter) = not(Width < Height)

Size_Large = if(IsLandscape, height, width)

Size_small = if(IsLandscape, width, height)

 

a4 = and(Size_small  = 210, Size_Large =297)

a3 = and(Size_small  = 297, Size_Large =420)

etc

a0 = and(Size_small = 841, Size_Large = 1189)

additionally:

a0_extended = and(Size_small = 841, Size_Large > 1189)

 

PaperSizeTitle = if(a4, "A4", if(a3, "A3", if(a2, "A2", if(a1, "A1", if(a0, "A0", if(a2_extended, "A2+", if(a1_extended, "A1+", if(a0_extended, "A0+", "-"))))))))

 

and:

calc_isExtended = or(a2_extended, a1_extended, a0_extended)

calc_Unmatched = not(or(calc_isExtended, a4, a3, a2, a1, a0)

 

With those last 2 parameter you can drive some visibily or text display warning that the size doesn't match.

In our titleblock, as soon as it's a Extended, the actual size is added to the PaperSize Text.

And if it doesn't match any A-Sizes, it will only display the Height x Width

 

For a actual a0 it reads: A0

And for a extended A0 it reads: A0+ (841x1500mm)

 

- Michel

0 Likes
Message 5 of 6

SteveKStafford
Mentor
Mentor

Just a contrary viewpoint to consider, I too once pursued a single powerful titleblock family but the more complicated it gets the fewer people I worked with could cope with them when the inevitable modifications that projects required came along. Now I just manage separate families for each size. There is some repetition to manage across families. It all reduces to managing complexity and striving to be user friendly. And projects don't tend to mix sheet sizes that often so having the other types/sizes is just extra baggage.


Steve Stafford
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
EESignature

0 Likes
Message 6 of 6

ToanDN
Consultant
Consultant

Just create different families for different sizes.

0 Likes