RevitCity.com Logo

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

Welcome !

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

 

Forums

Forums >> Revit Building >> Technical Support >> String Values in Formulas

Search this ThreadSearch this Thread | Page 1 of 1 |

Wed, Apr 11, 2007 at 4:48:12 PM | String Values in Formulas

#1

gaadmin


active

Joined: Sat, Apr 9, 2005
1 Posts
No Rating


I am familiar with programming but new to Revit. 

The short: Regarding formulas, are text parameter (string value) tests allowed in conditional statements?

The long: I have a room schedule and I have created a Calculated Value.  In the Formula field I am using a conditional IF to test the values of other parameters.  I would like to test the string value from one of the text parameters.  A simplified version is this:

IF (Occupancy = "Grade 3", Area/50, Area/40) 

With this however I get a message that says: "Improper use of boolean expressions".  If I use:

IF (Area > 600, Area/50, Area/40)

It works.  However the second formula is not the calculation I wish to make, I just used it to test that the issue was with the string expression.

Any help is appreciated!


This user is offline

 

Wed, Apr 11, 2007 at 7:31:29 PM | String Values in Formulas

#2

TomDorner


active

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


You cannot use text in formula evaluations.  If you are evaluting occupancy then you have to take a more sophiscated approach using Schedule Keys to develop a room or area style and then apply that Schedule Key to the room or area.

More in-depth than I can cover in a post.  There are some posts out on www.augi.com that do cover this in some detail.  I think a few that I have even contributed to.

 


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

Tom

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

 

This user is offline

View Website

Tue, Jul 5, 2011 at 4:40:27 PM | String Values in Formulas

#3

revolution9


active

Joined: Wed, May 16, 2007
3 Posts
No Rating


Further Question on these formulas...

I understand the formula when it relates to an integer and I am able to input the correct formula to create a check between occupancy, load factor, and exits etc.

However, I would like to apply the same type of check into my Room Finish schedule and check between the Wall, Ceiling, Base, and Floor Finishes in the Schedule VS the Room Finish Tag.

So, in short, I have created Shared Parameters called Wall Finish Tag, Ceiling Finish Tag... which are Text Parameters (since we simply enter in the text of each material/finish into the room properties).  I get the Boolean Expression error when I create the formula if(Wall Finish=Wall Finish Tag,1,0). Is this type of formula possible, or can it only work with Integers/Area etc?

Any suggestions on how to make this kind of check work?!

Thank you!!


This user is offline

 

Tue, Jul 5, 2011 at 4:52:49 PM | String Values in Formulas

#4

WWHub


site moderator|||

Joined: Tue, May 16, 2006
13079 Posts
3.5 Stars: 349 Votes


As Tom stated many years ago: " You cannot use text in formula evaluations."  Still can't use text in conditional statements. 


This user is online

 

Tue, Jul 5, 2011 at 4:55:49 PM | String Values in Formulas

#5

revolution9


active

Joined: Wed, May 16, 2007
3 Posts
No Rating


Fair enough. Is there any way to create the right type of parameter that will allow this check?

What if they were Material/Finish types? I REALLY want this to work!


This user is offline

 

Tue, Jul 5, 2011 at 5:10:44 PM | String Values in Formulas

#6

WWHub


site moderator|||

Joined: Tue, May 16, 2006
13079 Posts
3.5 Stars: 349 Votes


Sure, don't use text, use numbers!   

 

That doesn't work for you, does it?  Revit does a lot but it doesn't do everything everybody wants. 

 

You will need to check this manually as you always did in CAD or use the other tools provided by Revit.  Export your schedule to a txt file, open that with excel and put your formula there.  <<< DON'T COME BACK AND SAY YOU WANT IT IN REVIT BECAUSE YOU CAN'T


This user is online

 

Tue, Jul 5, 2011 at 5:22:03 PM | String Values in Formulas

#7

revolution9


active

Joined: Wed, May 16, 2007
3 Posts
No Rating


Hahahaha well it was worth a shot!

I suppose the best way to show this is keep the parameters as text, and keep the 'Tag' parameters in the schedule to compare. I was hoping to provide conditional formatting, but I understand that this is impossible.

thanks for the help. I really appreciate it!


This user is offline

 

Thu, Dec 5, 2013 at 4:38:12 AM | String Values in Formulas

#8

dingohot


active
dingohot Avatar

Joined: Mon, Mar 15, 2010
199 Posts
3.5 Stars: 5 Votes


Here is a workaround I use.

http://plevit1.blogspot.kr/2013/12/text-string-value-in-formula.html


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

want more?

You can get more tips at Enjoy Revit

This user is offline

View Website

Search this ThreadSearch this Thread | Page 1 of 1 |



Similar Threads

Thread/Thread Starter

Forum

Last Post

Replies

Parameter formulas losing calculated values

Revit Systems >> Technical Support

Wed, Jun 17, 2015 at 7:23:19 PM

1

Current date in formula on titleblock

Revit Building >> Technical Support

Mon, Oct 8, 2012 at 3:03:30 PM

0

Understanding Formulas

Revit Building >> Technical Support

Tue, Nov 16, 2010 at 7:36:05 PM

14

structure analys with Revit

Revit Structure >> Technical Support

Thu, May 11, 2006 at 5:30:26 PM

2

Creating Dimensions with english and metric dimesnions on one string

Revit Building >> Technical Support

Wed, Aug 26, 2009 at 12:15:58 PM

5

Site Stats

Members:

1469545

Objects:

20536

Forum Posts:

150616

Job Listings:

6

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: 3.6215

Login

User Name:

Password:

Remember Me  

Forgot Password?

Search Forums

Advanced Search

Search Forums

Advanced Search


Clear Highlights


Clear Highlights