RevitCity.com Logo

Home  |  Forums  |  Downloads  |  Gallery  |  News & Articles  |  Resources  |  Jobs  |  FAQ  |  SearchSearch  |  Join  |  LoginLogin

Welcome !

56 Users Online (55 Members): Show Users Online - Most ever was 626 - Mon, Jan 12, 2015 at 2:00:17 PM

 

Forums

Forums >> Revit Building >> Technical Support >> Parameter Formula

Search this ThreadSearch this Thread | Page 1 of 1 |

Mon, Feb 26, 2007 at 1:22:36 PM | Parameter Formula

#1

Recit


active

Joined: Mon, Oct 30, 2006
25 Posts
No Rating


PARAMETER FORMULA

I am trying to work on a parameter formula to allow me to correctly flex a component. See attached image.

Here is what I need the parameter formula to do: 

Length<=4' THEN 2

Length>4' upto and including 8' THEN 3

Length>8' but less than 12' THEN 4

Length=>12' but less than 16' THEN 5

Length=>16' THEN 6

 

That is it....let me know if you guys have any ideas in mind.

Thanks,

Recit



Attached Images

20785_Parameter_Formula.JPG

This user is offline

 

Mon, Feb 26, 2007 at 5:36:57 PM | Parameter Formula

#2

TomDorner


active

Joined: Sun, Apr 25, 2004
1207 Posts
4.5 Stars: 25 Votes


You can follow these guidelines for some more ideas.

• Use conditionals in the definition of the parameter whose value is conditional.

• In the Formula column next to the appropriate parameter, type the formula for the parameter. Noticethat the formula begins with an equal sign (=).

• IF based on one test statement: =IF (Test Condition, Result if true, Result if false)IF ( Length < 35' , 2'-6", 3'-0" )

• IF based on more than one test: =IF (AND/OR (Test1, Test2) Result if true, Result if false)IF ( AND (x = 1 , y = 2), 8 , 3 )IF ( OR ( A = 1 , B = 3 ) , 8 , 3 )

• IF based on a negative test: =IF ( NOT (Test Condition), Result if true, Result if false)IF ( NOT ( A > B ) , 8 , 3 )

• Simple result if True, another IF if false: =IF (Test Condition, Result if true, IF (Test Condition, Result iftrue, Result if false ))IF ( Length < 35' , 2' 6" , IF ( Length < 45' , 3' , IF ( Length < 55' , 5' , 8' ) ) )

• Set one YES/NO parameter to the opposite of another: =NOT Y/N Parameter

 

The question though is a complex conditional formula the best solution? Depending on what you are making can the array be driven by a type catalog? Can you do a first/last array and evlauate spacing via a formula that is simpler? Having a multi-nested conditional formula can lead to performace problems within the family. Of course that may not be a problem if you only have a couple of occurances within the project. If you have hundreds or thousands of them, then it is a different story. Without knowing more details it is hard to say what is the best option.

 



Edited on: Mon, Feb 26, 2007 at 5:38:09 PM

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

Tom

www.reviteer.com   http://twitter.com/Reviteer

 

This user is offline

View Website

Mon, Feb 26, 2007 at 6:48:59 PM | Parameter Formula

#3

rkitect


active
rkitect Avatar

Joined: Thu, Dec 16, 2004
792 Posts
4 Stars: 29 Votes


Recit,

 

Take a look at the metalStud family I attached to my post here and see if the parameters in there help any.  I use some parameters to control visibility and when/how an array functions based on the length of the family (it's line based so adapt as necessary).  Let me know if you have any questions about it. 


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

-//------------------------

Carl - rkitecsure[at]gmail.com

Need help? I'm probably in my chat room!

You fell victim to one of the classic blunders. The most famous is never get involved in a land war in asia, but only slightly less well known is this! Never go in against a Sicilian when death is on the line!

This user is offline

View Website

Mon, Feb 26, 2007 at 8:21:02 PM | Parameter Formula

#4

Sumex


active
Sumex Avatar

Joined: Wed, Oct 11, 2006
14 Posts
No Rating


Try this...

 If (Length < 3'11 63/64", 2, (If (and (Length >4' 0",Length < 8'0 1/64"Winking, 3, (If (and (Length >8' 0",Length < 12'0"Winking, 4, (If (and (Length >11' 11 63/64",Length < 16'0"Winking, 5, (If (Length < 16' 0 1/64", 6, 0)))))))))

 

Length must be a Length Parameter, and the Object parameter to be an Integer.  Less than / greater than or equal to (<=, >=) don't work, so you need to make determinations on tolerances.  I used 1/64th in this case.  You also need to have a "Catch all" which is the final Parameter, for any open loop, or instance not covered.  It acts as a check.  I used Zero (0).

 I hope this helps...


This user is offline

 

Mon, Feb 26, 2007 at 8:23:40 PM | Parameter Formula

#5

Sumex


active
Sumex Avatar

Joined: Wed, Oct 11, 2006
14 Posts
No Rating


You know, shortcut smileys shouldn't be active on a site that discusses LISP........

Everywhere you see a smiley in my previous post, assume a close parenthesis.....


This user is offline

 

Tue, Feb 27, 2007 at 12:27:58 PM | Parameter Formula

#6

Recit


active

Joined: Mon, Oct 30, 2006
25 Posts
No Rating


 

THANKS GUYS FOR YOUR HELP. I CAN HANDLE EASY FORMULAS, BUT THE COMPLICATED ONES STILL BEAT ME DOWN!

I'LL LET YOU KNOW IF IT WORKS.


This user is offline

 

Tue, Feb 27, 2007 at 6:09:11 PM | Parameter Formula

#7

Recit


active

Joined: Mon, Oct 30, 2006
25 Posts
No Rating


 

Guys, after all your suggestions, here is the winning formula:

if(Length = 16', 5, if(Length > 16', 6, if(Length = 12', 4, if(Length > 12', 5, if(Length = 8', 3, if(Length > 8', 4, if(Length > 4', 3, 2)))))))

 

I learned that it makes a difference the sequence of numbers. That is to say that in the above formula begining from the bigger number and ending with a smaller number allows me to end it nicely. the numbering sequence is critical in the formula's behavior. In this case a decreasing sequence works much better than an increasing manner because it closes nicely with the last TRUE,FALSE)


This user is offline

 

Tue, Feb 27, 2007 at 7:12:50 PM | Parameter Formula

#8

Sumex


active
Sumex Avatar

Joined: Wed, Oct 11, 2006
14 Posts
No Rating


I have found that the best way to stay organized with nested LISP Statements is to write each requirement on a line of excel and add XXXX under false, and then start at the bottom and enter the line into the previous line's false requirements...  Like this>>>

If (Length <= 4' 0", 2, xxxx)

If (and (Length >4' 0",Length < 8'0"Winking, 3, xxxx)If (and (Length >8' 0",Length < 12'0"Winking, 4, xxxx)If (and (Length >12' 0",Length < 16'0"Winking, 5, xxxx)

If (Length <= 16' 0", 6, 0)

Turns into:

If (Length < 3'11 63/64", 2, (If (and (Length >4' 0",Length < 8'0 1/64"Winking, 3, (If (and (Length >8' 0",Length < 12'0"Winking, 4, (If (and (Length >11' 11 63/64",Length < 16'0"Winking, 5, (If (Length < 16' 0 1/64", 6, 0)))))))))

(If (and (Length >4' 0",Length < 8'0 1/64"Winking, 3, (If (and (Length >8' 0",Length < 12'0"Winking, 4, (If (and (Length >11' 11 63/64",Length < 16'0"Winking, 5, (If (Length < 16' 0 1/64", 6, 0))))))))(If (and (Length >8' 0",Length < 12'0"Winking, 4, (If (and (Length >11' 11 63/64",Length < 16'0"Winking, 5, (If (Length < 16' 0 1/64", 6, 0))))))(If (and (Length >11' 11 63/64",Length < 16'0"Winking, 5, (If (Length < 16' 0 1/64", 6, 0))))(If (Length < 16' 0 1/64", 6, 0))

This user is offline

 

Search this ThreadSearch this Thread | Page 1 of 1 |



Similar Threads

Thread/Thread Starter

Forum

Last Post

Replies

One family parameter has formula one has none

General Discussion >> Revit Project Management

Wed, Jun 25, 2014 at 1:05:54 PM

7

Parameter Formula

Revit Building >> Technical Support

Fri, Mar 5, 2010 at 12:09:09 PM

6

Formula - IF statement

Revit Building >> Technical Support

Wed, Oct 25, 2006 at 6:54:24 AM

0

Referencing a Shared Parameter in a Family parameter formula.

General Discussion >> Revit Project Management

Thu, Jan 29, 2015 at 1:26:24 PM

4

Parameter names with dashes - problem with formula

Revit Building >> Technical Support

Tue, Aug 31, 2010 at 10:28:39 AM

4

Site Stats

Members:

2056191

Objects:

23069

Forum Posts:

152281

Job Listings:

3

Sponsored Ads

Home | Forums | Downloads | Gallery | News & Articles | Resources | Jobs | Search | Advertise | About RevitCity.com | Link To Us | Site Map | Member List | Firm List | Contact Us

Copyright 2003-2010 Pierced Media LC, a design company. All Rights Reserved.

Page generation time: 0.3942

Login

User Name:

Password:

Remember Me  

Forgot Password?

Search Forums

Advanced Search

Search Forums

Advanced Search


Clear Highlights


Clear Highlights