limit the object length

limit the object length

Anonymous
Not applicable
5,169 Views
20 Replies
Message 1 of 21

limit the object length

Anonymous
Not applicable

hi, guys,

how can limit a family do not exceed the length of 6m?

0 Likes
Accepted solutions (3)
5,170 Views
20 Replies
Replies (20)
Message 2 of 21

Sujan.Maharjan
Collaborator
Collaborator

Please tell us in a little more detail what are you actually trying to do  How to Get Help


"Revit Lies in the tension between what we want to do and what can be done!"
0 Likes
Message 3 of 21

piotr.bocian
Advocate
Advocate
Accepted solution

There is no typical way for this. But for example you can create a parameter called Length by which you will be able to control length and another one parameter called LengthCalc which will be constrained to the geometry and controlled by formula if(Length>6m, 6m, Length). So if you specify Length more than 6m, LengthCalc (and length of the object) is 6m. If you specify Length 6m or less, LengthCalc is the same value as Length.

0 Likes
Message 4 of 21

Anonymous
Not applicable

Thanks, solution accepted.

but how to use, still don't get it.

found one sample should be the same method as your told(as below capture)

but ,how "Angle 1" will affect in geometry, looks like no parameters refefenced "Angle 1"

can you kindly help to write a simply example?

 

cc.png

0 Likes
Message 5 of 21

Anonymous
Not applicable

thanks your kindly reply,

i am learning about the parameter setting formula,

want to know more about it's function.

0 Likes
Message 6 of 21

Sujan.Maharjan
Collaborator
Collaborator
Accepted solution

Hey Try this Revit Formula for Everyday USE


"Revit Lies in the tension between what we want to do and what can be done!"
0 Likes
Message 7 of 21

Sujan.Maharjan
Collaborator
Collaborator

Hi @Anonymous

I might have been more helpful if you would have told what exactly you are trying to do.

 

See this image .

  1. Your input will be in length parameter but need to assign lengthCalc parameter to the Dimension 
  2.  If your value of length is Greater than 6000 , lengthCalc = 6000  Else whatever you input in length Parameter

2018-12-27_16-40-22.png


"Revit Lies in the tension between what we want to do and what can be done!"
Message 8 of 21

piotr.bocian
Advocate
Advocate

Here you go an example.

0 Likes
Message 9 of 21

Anonymous
Not applicable

i am building the C-Channel family.

in the view of construction-oriented, so the the simply thought comes in my mind, how can i limit the C-channel in real length. 

many thanks for the formula sharing, that is great.

 

0 Likes
Message 10 of 21

Anonymous
Not applicable

thanks, what a surprise.

you guys are so kind.

0 Likes
Message 11 of 21

Anonymous
Not applicable

this sample can't change the length.

and why there is no dimension of length

0 Likes
Message 12 of 21

piotr.bocian
Advocate
Advocate

End of extrusion of the solid is associated with LengthCalc parameter.

0 Likes
Message 13 of 21

Anonymous
Not applicable

Sharm to ask,

but how Smiley Frustrated

0 Likes
Message 14 of 21

piotr.bocian
Advocate
Advocate
Accepted solution

Here you go instruction:

Bez tytułu.png

0 Likes
Message 15 of 21

Anonymous
Not applicable

thank you so much~

0 Likes
Message 16 of 21

ardalan_mirhadi
Observer
Observer

Hi, Thank you for the solution. I have different types and I want various constraints for each type. But whenever I change the formula it changes in all types. what can I do about this Issue:

ardalan_mirhadi_0-1687432973508.png

 



0 Likes
Message 17 of 21

fabiosato
Mentor
Mentor

Hello,

 

Don´t use the value in the formula colunm, just place a value to each type.

Fábio Sato
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 18 of 21

ardalan_mirhadi
Observer
Observer

Hi. 

Thank you for your response. I didn't put Value in formula. So maybe I explain what is my intention.
I have 3 types of panels:

Standard - which the size is fixed: 1587*664

Short - 664 is fixed but the length can be between 664 and 1587 | if(Length < 664 mm, 664 mm, if(Length > 1587 mm, 1587 mm, Length))

Passive - both length and width should be between min 250mm and max 1587 | if(Length < 250 mm, 250 mm, if(Length > 1587 mm, 1587 mm, Length))

------------

I'm a beginner in Revit so maybe my question is basic. but the problem is I want different rules for each type, although by changing the type the formula remains. or by changing the formula for passive the formula for short changed again. Also, I test in the project and the constrain didn't limit the user to exceed the limits.

Thank you

 

0 Likes
Message 19 of 21

piotr.bocian
Advocate
Advocate

Hey,

You can add three 'yes/no' type parameters and set them according to types and use them in formulas as below:

piotrbocian_0-1687511370807.png

 

Formula for LengthCalc is: 

if(IsStandard, 1587 mm, if(and(IsShort, Length < 664 mm), 664 mm, if(and(IsShort, Length > 1587 mm), 1587 mm, if(and(IsPassive, Length < 250 mm), 250 mm, if(and(IsPassive, Length > 1587 mm), 1587 mm, Length)))))

 

For WidthCalc will be similar formula with values of Width.

Message 20 of 21

ardalan_mirhadi
Observer
Observer

Hi @piotr.bocian 

Thank you for your solution.

That works well for types. But when I loaded it into the project and change the size(for example for short), the value in the table changed, but nothing happen to the model. do you know the reason?

ardalan_mirhadi_0-1687514910655.png

the left Panel is standard, so by changing Valus in dimension, the selected panel should be shortened.

Thank you so much for your help.

0 Likes