Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Min and Max Length Parameter

16 ANTWORTEN 16
GELÖST
Antworten
Nachricht 1 von 17
mmarcarelliNX
7579 Aufrufe, 16 Antworten

Min and Max Length Parameter

I have an interesting dilemma that I'm sure some of you may have run into before. I have an element that needs to have a defined minimum and maximum length associated with them.

 

I'm using a Length (user input length value) and Length Calc (this uses a nested if statement) set of length parameters.

 

Example: A user inputs 5' into Length and the element uses the Length Calc formula: 
if(Length < 0', 0', if(Length > 3', 3', Length))   
and everything works as it should by stopping the element at 3' instead of 5' that the user input.

 

My question is, how do I constrain the user input Length parameter from having a negative value as an option? As we all know once a length parameter goes into a negative value it breaks the component. In this specific example I'm running a dimension from a centerline so having a negative value from center is a real possibility.

 

Thanks in advance!!

16 ANTWORTEN 16
Nachricht 2 von 17
barthbradley
als Antwort auf: mmarcarelliNX



@mmarcarelliNX wrote:


if(Length < 0', 0', if(Length > 3', 3', Length))   

 

My question is, how do I constrain the user input Length parameter from having a negative value as an option? 

 




What's wrong with the parameter you have? "...<0...".  

 

 

 

 

Nachricht 3 von 17
mmarcarelliNX
als Antwort auf: barthbradley

I'm using that concept to limit the placement of the object. However, if the user input parameter becomes a negative value the family still breaks (even though the object stays at a length of 0). Is there a way to limit that first user input parameter to accept a negative value without breaking the family?

Nachricht 4 von 17
ToanDN
als Antwort auf: mmarcarelliNX

Are you saying some user deliberately enters something like -2'-0" in the field value?
Nachricht 5 von 17
barthbradley
als Antwort auf: mmarcarelliNX

I just tested and your parameter works fine. Negative values are treated as <0.  

Nachricht 6 von 17
barthbradley
als Antwort auf: mmarcarelliNX

How about this?

 

Fired.png

 

Nachricht 7 von 17
mmarcarelliNX
als Antwort auf: barthbradley

@barthbradley although I appreciate the sentiment, I'd put that in and no one would read it, I'm trying to script this in to enforce the issue.

 

I've attached a component in question, drag the arrow to the right of the center of the component. From the research I've done it doesn't look possible, but I'm all for any and all suggestions to hard code it into the component. 

Nachricht 8 von 17
mmarcarelliNX
als Antwort auf: mmarcarelliNX

...apparently I can't upload .rfa files?

Nachricht 9 von 17
barthbradley
als Antwort auf: mmarcarelliNX


@mmarcarelliNX wrote:

...apparently I can't upload .rfa files?


 

Yep, it has been a nightmare lately.

 

BTW, I was kidding about the "Warning".   Your formula works fine as is.  I'm not understanding the problem.  

 

Negative.png

Nachricht 10 von 17
ToanDN
als Antwort auf: mmarcarelliNX

Zip it and upload.
Nachricht 11 von 17
mmarcarelliNX
als Antwort auf: barthbradley

for an ease of user control, having the instance grip control the instance length is important. In the snip below, as soon as the grips go to the right side of the CL, the length value goes negative and the component breaks.

Line Based Detail Item Building Symbol.PNG

 

interesting to note that length parameters can have a negative value but the dimension is what actually breaks, good to know.

 

Now, if anyone has any pearls of wisdom to have that slider start at the centerline and can slide to the left AND the right, I am all ears.

Nachricht 12 von 17
mmarcarelliNX
als Antwort auf: mmarcarelliNX

third times a charm

Nachricht 13 von 17
barthbradley
als Antwort auf: mmarcarelliNX

I'm still not following. Revit herself will throw a fricking fit if the user drags handle to a point that it breaks the family. You don't even need that Warning parameter. One is already hardwired into Revit.  

Nachricht 14 von 17
bin
Advisor
als Antwort auf: mmarcarelliNX

Might be a better solution, but here is what I have:

16102019.PNG

Nachricht 15 von 17
SDavisLMKG6
als Antwort auf: mmarcarelliNX

bump

Nachricht 16 von 17
mhiserZFHXS
als Antwort auf: SDavisLMKG6

What's the purpose of the bump? Are you having a similar issue?

Nachricht 17 von 17
HVAC-Novice
als Antwort auf: mmarcarelliNX

You can vote on this idea that may resolve your original problem:

https://forums.autodesk.com/t5/revit-ideas/approved-ranges-for-numeric-parameters/idi-p/6323968

 

Revit version: R2025.4

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report