Looking for a Revit formula - Convert width to module width (890 -> 9M)

Looking for a Revit formula - Convert width to module width (890 -> 9M)

Marcus.Isacsson
Collaborator Collaborator
888 Views
12 Replies
Message 1 of 13

Looking for a Revit formula - Convert width to module width (890 -> 9M)

Marcus.Isacsson
Collaborator
Collaborator

Hi fellas!

I wonder if anyone here knows it's somehow to convert widths to a module width, how would that formula look if possible?
For example:

Width
890 - 910 converts to 9M
990 - 1010 converts to 10M
1090 - 1110 converts to 11M and so on.

Would be neat!

Thanks in advance
/Marcus

0 Likes
Accepted solutions (1)
889 Views
12 Replies
Replies (12)
Message 2 of 13

ToanDN
Consultant
Consultant
Parameter2 = round(Parameter1)
0 Likes
Message 3 of 13

Marcus.Isacsson
Collaborator
Collaborator

@ToanDN wrote:
Parameter2 = round(Parameter1)

Alright, that's something. But how do you go from 890 to 910 converting to 9M the whole way?

0 Likes
Message 4 of 13

ToanDN
Consultant
Consultant
If I understand correctly, you want to convert 890 to 910 mm to 9 meter. Is the concern the capital M? If you plan to use this parameter in a schedule or a tag, then the display of the capital M is a non issue.
0 Likes
Message 5 of 13

Marcus.Isacsson
Collaborator
Collaborator

@ToanDN wrote:
If I understand correctly, you want to convert 890 to 910 mm to 9 meter. Is the concern the capital M? If you plan to use this parameter in a schedule or a tag, then the display of the capital M is a non issue.

Not exactly. Not meter, but we want to call something with the measuremt 890 to 910 -> 9M (not meter).

How can I set up a parameter for this conversion?

0 Likes
Message 6 of 13

Marcus.Isacsson
Collaborator
Collaborator

I need this for doors, where everytime the width is between 890 mm to 910 mm it should say 9M instead of the measurement.
It's a standardised way of door measurements here.

0 Likes
Message 7 of 13

chrisplyler
Mentor
Mentor

Where should it say it? In the schedule somewhere? In a tag? In a dimension string?

 

0 Likes
Message 8 of 13

Marcus.Isacsson
Collaborator
Collaborator

@chrisplyler wrote:

Where should it say it? In the schedule somewhere? In a tag? In a dimension string?

 


Both in a tag and in a schedule would be really neat.

0 Likes
Message 9 of 13

ToanDN
Consultant
Consultant

@Marcus.Isacsson wrote:

I need this for doors, where everytime the width is between 890 mm to 910 mm it should say 9M instead of the measurement.
It's a standardised way of door measurements here.


It's possible.  I have done it to identify modular casework.  Before getting into creating a formula, what if a door is 850, for example?

0 Likes
Message 10 of 13

Marcus.Isacsson
Collaborator
Collaborator

@ToanDN wrote:

@Marcus.Isacsson wrote:

I need this for doors, where everytime the width is between 890 mm to 910 mm it should say 9M instead of the measurement.
It's a standardised way of door measurements here.


It's possible.  I have done it to identify modular casework.  Before getting into creating a formula, what if a door is 850, for example?


Good question. We usually keep it between 890 - 910 because it's standardised here.
But It could be good to have a larger margin, maybe 870 - 930 or whatever.

0 Likes
Message 11 of 13

ToanDN
Consultant
Consultant
Accepted solution

See Revit 2017 attached.

 

Capture1.PNGCapture2.PNGCapture3.PNGCapture4.PNGCapture.PNG

Message 12 of 13

Marcus.Isacsson
Collaborator
Collaborator

Nice! Oh, looks so simple now! Will try it out, thanks for a nice walkthrough.

Question: Whats the purpose of "Empty field"? 🙂

0 Likes
Message 13 of 13

ToanDN
Consultant
Consultant

@Marcus.Isacsson wrote:


Whats the purpose of "Empty field"? 🙂


I originally created a field to enter the letter 'M' and combined it with DoorW so the column would read 9M.   Then I realized when combine the fields, Revit allows to add a Suffix, so I added 'M' directly as a Suffix of DoorW.  But the Empty field must be there, though empty, because a combine field must have a minimum of 2 fields.

 

So, if you have different letters for different door type, make a Type parameter and combine it in the same manner, then you can have things like 9M, 10N, 11L, etc.