RevitCity.com Logo

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

Welcome !

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

 

Forums

Forums >> Revit Building >> Technical Support >> Checking if a parameter value is a integer or a real

Search this ThreadSearch this Thread | Page 1 of 1 |

Thu, Sep 27, 2007 at 1:41:23 AM | Checking if a parameter value is a integer or a real

#1

johnda


active

Joined: Wed, Apr 27, 2005
8 Posts
No Rating


Revit 2008 

Does anyone have any way of determining if the true value of a parameter is an integer or a real eg 4 or 4.2.

If this was in a if statement it would be perfect

Cheers John A


This user is offline

 

Thu, Sep 27, 2007 at 11:22:39 AM | Checking if a parameter value is a integer or a real

#2

bauhaus1919


active
bauhaus1919 Avatar

Joined: Mon, Mar 20, 2006
219 Posts
3.5 Stars: 9 Votes


This is theoretical...sorry don't have time to fully test it, but here goes:

Make a parameter that is an Integer type. Set its formula to be equal to the Parameter you are checking. It should round off any fractions. Then you can make a parameter with an IF statement that checks whether your original value and the "integer"ized value are equal...if they are, then the original was an integer to begin with, if no...it wasn't.

Just taking a shot. 


This user is offline

 

Tue, Jan 15, 2008 at 8:24:55 PM | Checking if a parameter value is a integer or a real

#3

ExpoHire


active

Joined: Tue, Nov 27, 2007
2 Posts
No Rating


I have been using this for Arrays.  I needed to return an Integar value, not a rounded value.  Revits Integar isn't technical correct.  Using the INT command in other programs will return 5.9 as 5 where Revit will return 6.

I have be using this to figure out complete sheets (4'x8' sheets).  I have two family parameters, one is Number type and one is Integar, they are both calculated off the equation (which is Dimension to be Covered divided by Sheet Width)

If(Number > Integar, Integar , Integar -1)

 -1 takes the 5.9 rounded to 6 back down to 5,  as an integar should be

 


This user is offline

 

Wed, Jan 16, 2008 at 6:48:49 AM | Checking if a parameter value is a integer or a real

#4

bauhaus1919


active
bauhaus1919 Avatar

Joined: Mon, Mar 20, 2006
219 Posts
3.5 Stars: 9 Votes


If all you need is for Revit to always round up, that's a lot easier. Using your example make an integer type parameter with formula

 

= Length / Sheet Width + .4999

 

5.3 becomes 5.7999 and reports as 6...5.7 becomes 6.1999 and reports as 6.  It's .4999 and not simply .5 in case Length divided by Sheet Width returns an integer in the first place it will round back down to the integer.


This user is offline

 

Search this ThreadSearch this Thread | Page 1 of 1 |



Similar Threads

Thread/Thread Starter

Forum

Last Post

Replies

'Inconsistent units" error in parameter formula; length vs integer

Revit Building >> Technical Support

Fri, Dec 13, 2013 at 10:37:04 PM

5

integer parameter problem

Revit Building >> Technical Support

Thu, Jun 14, 2007 at 3:15:37 PM

1

Conditional toggle yes no formula

Revit Building >> Technical Support

Thu, Mar 3, 2016 at 8:49:22 AM

0

How/When do I use each Parameter?

Revit Building >> Technical Support

Wed, Jan 21, 2009 at 10:21:02 AM

6

family with (3) or more yes/no options

Revit Building >> Technical Support

Wed, May 18, 2016 at 7:38:51 AM

1

Site Stats

Members:

2056537

Objects:

23074

Forum Posts:

152325

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.4785

Login

User Name:

Password:

Remember Me  

Forgot Password?

Search Forums

Advanced Search

Search Forums

Advanced Search


Clear Highlights


Clear Highlights