|
|
Home | Forums |
Downloads | Gallery |
News & Articles | Resources |
Jobs | FAQ |
| Join |
Welcome !
|
64 Users Online (63 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
|
|
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 |
|
![](images/spacer.gif) |
|
active
![bauhaus1919 Avatar](user_avatar/16150.jpg)
Joined: Mon, Mar 20, 2006
219 Posts
![3.5 Stars: 9 Votes](/images/stars_3.5.gif) |
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 |
|
![](images/spacer.gif) |
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 |
|
![](images/spacer.gif) |
active
![bauhaus1919 Avatar](user_avatar/16150.jpg)
Joined: Mon, Mar 20, 2006
219 Posts
![3.5 Stars: 9 Votes](/images/stars_3.5.gif) |
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 |
|
![](images/spacer.gif) |
![](images/spacer.gif) |
Similar Threads |
'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
|
![](images/spacer.gif) |
|
Site Stats
Members: | 2022260 | Objects: | 22975 | Forum Posts: | 152203 | Job Listings: | 3 |
|