RevitCity.com Logo

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

Welcome !

160 Users Online (159 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 11:48:12 AM | String Values in Formulas

#1

gaadmin


active

Joined: Fri, Apr 8, 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 2:31:29 PM | String Values in Formulas

#2

TomDorner


active

Joined: Sun, Apr 25, 2004
1207 Posts
4.5 Stars: 25 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 11:40:27 AM | 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 11:52:49 AM | String Values in Formulas

#4

WWHub


site moderator|||

Joined: Tue, May 16, 2006
13079 Posts
3.5 Stars: 389 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 offline

 

Tue, Jul 5, 2011 at 11:55:49 AM | 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 12:10:44 PM | String Values in Formulas

#6

WWHub


site moderator|||

Joined: Tue, May 16, 2006
13079 Posts
3.5 Stars: 389 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 offline

 

Tue, Jul 5, 2011 at 12: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

 

Wed, Dec 4, 2013 at 10:38:12 PM | 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 2:23:19 PM

1

Current date in formula on titleblock

Revit Building >> Technical Support

Mon, Oct 8, 2012 at 10:03:30 AM

0

Understanding Formulas

Revit Building >> Technical Support

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

14

Creating Dimensions with english and metric dimesnions on one string

Revit Building >> Technical Support

Wed, Aug 26, 2009 at 7:15:58 AM

5

Preloaded Size Values in Revit MEP

General Discussion >> Revit Project Management

Tue, Aug 24, 2010 at 1:54:48 PM

3

Site Stats

Members:

1991090

Objects:

22877

Forum Posts:

152184

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

Login

User Name:

Password:

Remember Me  

Forgot Password?

Search Forums

Advanced Search

Search Forums

Advanced Search


Clear Highlights


Clear Highlights