Sheet parameter that show sheet format

Sheet parameter that show sheet format

popa.adriana.maria.stud19
Contributor Contributor
1,314 Views
12 Replies
Message 1 of 13

Sheet parameter that show sheet format

popa.adriana.maria.stud19
Contributor
Contributor

Hello,

 

Im trying to figure out how can i put a formula based on Sheet Dimensions parameters that can show the sheet format.

 

For example:

When its 420x297 to show A3, or when its 594x420 to show A2, else hide the parameter or show "-". Is it possible?

It should work on both vertical and horizontal sheets. (like even it is 420x297 or 297x420 to show A3)

 

Does anyone done this?

0 Likes
Accepted solutions (3)
1,315 Views
12 Replies
Replies (12)
Message 2 of 13

RDAOU
Mentor
Mentor
Accepted solution

@popa.adriana.maria.stud19 

 

Assuming that you have all the sizes defined in One single title block family…and instead of heaving a ton of IFs and nested IF statements for all those Portrait and Landscape combinations,

  • simply set the size as a shared type parameter (linked to a label on in the title block) and define the Ax for each type 
  • Or place multiple text notes (one for each dimension) and assign each with a type parameter y/n visibility ie: predefined visibility by type 

 

 

 

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 3 of 13

popa.adriana.maria.stud19
Contributor
Contributor

Thank you!

A was thinking the same but thought it is a cleaner way to do this instead of this. But in a visibility parameter how can i add multiple rules/conditions , like lenght = 297 mm and height = 420 mm in the same formula ?

0 Likes
Message 4 of 13

Simon_Weel
Advisor
Advisor
Accepted solution

You have to create parameters for each format.

Simon_Weel_1-1739809874234.png

Text parameter formaat reads like this:

 

if(breedte = 210 mm, "A4", if(breedte = 420 mm, "A3", if(breedte = 594 mm, "A2", if(breedte = 841 mm, "A1", if(breedte = 1051 mm, "A1+", if(and(breedte = 1261 mm, hoogte = 594 mm), "A1++", if(and(breedte = 1471 mm, hoogte = 594 mm), "A1+++", if(breedte = 1189 mm, "A0", if(and(breedte = 1261 mm, hoogte = 841 mm), "A0+", if(and(breedte = 1471 mm, hoogte = 841 mm), "A0++", if(breedte = 1681 mm, "A0+++", "")))))))))))

 

breedte = the parameter 'width' of the sheet.

For this kind of formulas, I like to use Notepad++ which keeps track of all parenthesis.

Message 5 of 13

RDAOU
Mentor
Mentor

@popa.adriana.maria.stud19 

 

You can but the question remains “how much does nesting for if statements improves the title block and makes it better vs simply pre defining the value of a text label or visibility of a text note?

 

If you like fancy ifs, create a labor for sheet size with a shared text parameter for sheets then set the formula if(L=W, P1, If(L=X, P2, If(L=Y, P3, if(L=Z, P4, P5)))) … if that would be the portrait version you would need a second for the landscape!

 

P1,P2,P3,P4,P5 would have predefined locked values A0, A1, A2, A3, A4 which can be hidden so that users don’t see when loaded and can’t  mess around too much with values


There are also a couple of other way to do it but honestly simply Typing in A3 or A2 in the sheet type does the job…keep simple

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 6 of 13

popa.adriana.maria.stud19
Contributor
Contributor
Accepted solution

@RDAOU I know what you said, i was having this kind of approch for years, and i can tell you that most of the people forget to write something there..

@Simon_Weel Thank you for your formula!

I made mine based on yours where "Lungime" is the width and "Inaltime" is for height 

if(and(Lungime = 297 mm, Inaltime = 210 mm), "A4", if(and(Lungime = 420 mm, Inaltime = 297 mm), "A3", if(and(Lungime = 594 mm, Inaltime = 420 mm), "A2", if(and(Lungime = 841 mm, Inaltime = 594 mm), "A1", if(and(Lungime = 841 mm, Inaltime = 1189 mm), "A0", if(and(Lungime = 210 mm, Inaltime = 297 mm), "A4", if(and(Lungime = 297 mm, Inaltime = 420 mm), "A3", if(and(Lungime = 420 mm, Inaltime = 594 mm), "A2", if(and(Lungime = 594 mm, Inaltime = 841 mm), "A1", if(and(Lungime = 1188 mm, Inaltime = 841 mm), "A0", "-"))))))))))

 

Breaking in in raws for easy understanding for others if needed:

 

if(and(Lungime = 297 mm, Inaltime = 210 mm), "A4",
if(and(Lungime = 420 mm, Inaltime = 297 mm), "A3",
if(and(Lungime = 594 mm, Inaltime = 420 mm), "A2",
if(and(Lungime = 841 mm, Inaltime = 594 mm), "A1",
if(and(Lungime = 841 mm, Inaltime = 1189 mm), "A0",
if(and(Lungime = 210 mm, Inaltime = 297 mm), "A4",
if(and(Lungime = 297 mm, Inaltime = 420 mm), "A3",
if(and(Lungime = 420 mm, Inaltime = 594 mm), "A2",
if(and(Lungime = 594 mm, Inaltime = 841 mm), "A1",
if(and(Lungime = 1188 mm, Inaltime = 841 mm), "A0",

"-"))))))))))

If you add more rules you need to close more brackets. If you want to change the "-" displayed when other formats you can change the end quate 

 

Thank you! 

Message 7 of 13

RDAOU
Mentor
Mentor

@popa.adriana.maria.stud19 wrote:

@RDAOU I know what you said, i was having this kind of approch for years, and i can tell you that most of the people forget to write something there..

 


🙂 Then you didn't read carefully enough. Users do not get to type anything because the values for the Label are predefined, locked, and can even be hidden—i.e., they do not appear when loaded into the model.

 

Codes are meant to make life easier and simpler. Is having nine nested IF statements just to display A4, A3, A2, A1, and A0 easy and simple? Moreover, based on your own argument, if users are indeed expected to open and edit such families, wouldn’t an endless chain of IF statements make it even more prone to errors? vs One hidden predefined type parameters which the user do not see and cannot edit once loaded into the model?

 

 

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 8 of 13

Simon_Weel
Advisor
Advisor

It's many years ago I made title blocks, and the solution I posted in this thread was the best I could find.

I wonder if you could post your title block? I'm curious how you solved this thing...

Message 9 of 13

popa.adriana.maria.stud19
Contributor
Contributor

There are also a couple of other way to do it but honestly simply Typing in A3 or A2 in the sheet type does the job…keep simple - I was answering to this one, for the last 3 years i used to have a text parameter where i can manually type for each sheet the format.  The show hide option i was documenting before posting here, but i was curious to find out if there is another way. I don't know but for me know i think the code was the best/clean option. 

 

 

0 Likes
Message 10 of 13

RDAOU
Mentor
Mentor

Hey @Simon_Weel 

 

I have nothing against the solution(s) you use if they work for you. In fact, I even advised the OP that he could use a similar approach. However, I prefer a more simplistic method, especially when no computations are truly necessary. I am sorry I didn't notice your earlier reply to the OP. Most of the answers I send are based on the RSS feeds and are posted via emails, so I don’t get to read others’ responses unless they are direct replies to mine.

 

My approach is neither complicated nor difficult to understand, especially for someone with as many years of experience as you. I use a Label with one Shared Parameter placed in the title block family

  • Data Type: Text
  • Value defined by family type
  • State: Set to Hidden in the sharedparameters.txt file

This means no formulas or user input are required in the model. When loaded into the model, users won’t even see a field or parameter to input text. They simply change the family type to a different size, and the label’s text updates automatically.

 

Even if I wanted to make the above look more refined and sophisticated, I still wouldn’t use a formula with 10 IF statements and 10 extra parameters, I’d use a Lookup Table instead. But the key point I wanted to convey to the OP is that this is a really simple solution. Back in the day, I had bigger issues to worry about than switching a sheet size using a formula. Any BIM Coordinator or BIM Manager should understand the reasoning behind this approach.

 

PS: an sadly no I cannot share any title block family. I neither do BIM coordination nor BIM Management anymore. It is more of a hobby now. But if you insist or cannot follow the steps given above, I can put one together for you when I am at a workstaion with Revit

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


0 Likes
Message 11 of 13

popa.adriana.maria.stud19
Contributor
Contributor

Speaking offtopic, does any of you manage to have the sheet dimensions in a schedule or/and be exported with the PDF for easy managing the printing? I tryed with a shared parameter but in schedule is empty although in the sheet i see the value?

0 Likes
Message 12 of 13

Simon_Weel
Advisor
Advisor

Indeed much simpler, which makes me wonder why I chose the elaborate method in the past?

Anyway, digging into this matter again, I stumbled upon an old problem. That is: add the page format to a sheet schedule. Never managed to get that done automatically?

Message 13 of 13

RDAOU
Mentor
Mentor

@Simon_Weel 

 

Till date no it is not possible automatically considering that the parameter of title block are in the title block family but what is being scheduled are the sheets which is an different category. You would need to translate the values from the Title Block Parameter into a shared parameter in the sheet category

 

I am not sure if the EULA permits me to disclose such info, so a discussion admin is free to omit it ...In the next Revit Release they are introducing this feature into sheet list (scheduling sheet size). Its still in testing so dont take my words as a promise if it is not released later this year

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION