RevitCity.com Logo

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

Welcome !

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

 

Forums

Forums >> Revit Building >> Technical Support >> Syntax issue: Left Parenthesis is Not Expected

Search this ThreadSearch this Thread | Page 1 of 1 |

Mon, Aug 17, 2015 at 12:46:15 PM | Syntax issue: Left Parenthesis is Not Expected

#1

kittyj2345


active

Joined: Fri, Jul 17, 2015
0 Posts
No Rating


I am creating a door family that will show the required ADA clearance for doors. Clearance dimensions vary depending on approach direction, whether you are pushing or pulling the door, whether you have a latch, and whether you have a closer. I have yes/no parameters set up for Push, Latch, and Closer. Approach direction is coded (1=front approach, 2= hinge side approach, 3= latch side approach) as an integer parameter. All of these are instance parameters.

Right now I'm working on the clearance that is needed on the side of the door that latches. Here's the logic I want to use

  1. If Push is not checked, 18"
  2. If Push is checked, AND latch AND closer are checked, 12"
  3. If Push is checked but latch and closer are not both checked, 0"

I used the following syntax, and got the "Left Parenthesis is not expected" error:

=if(Push (and(Latch, Closer, Approach Direction = 1), 1'),18")

When I delete the left perenthesis in front of "Push" or "and," I get errors that "if Push",  and "and Latch" are not valid parameters. When I delete the left parenthesis in front of "Latch", it doesn't complain about valid parameter names, but it gives me the same "Left parenthesis is not expected" message. 

Any ideas?

(Note that in the attached file, there isn't anything in the formula for Latch Clearance Width because it won't let me save the formula that it thinks is erroneous.)



This user is offline

 

Mon, Aug 17, 2015 at 1:07:18 PM | Syntax issue: Left Parenthesis is Not Expected

#2

WWHub


site moderator|||

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


Did you look at the HELP?


This user is offline

 

Thu, Sep 3, 2015 at 3:49:45 PM | Syntax issue: Left Parenthesis is Not Expected

#3

chilie


active

Joined: Tue, Sep 27, 2011
2 Posts
No Rating


There are a couple items wrong in your formula.  To start, yes or no statements cannot understand "=1". I know you are saying that if they are checked (which is 1 in revit terms) then it should follow. However, when using a condition for a yes/no parameter, you just say the name of the yyes/no paramter. If its unchecked, revit understands that you are only interested in if its unchecked.  As for the "Left Pararenthis is unexpected", I can see what is wrong just by looking at your formula synatax.  You have to go back to your days of learning algebra formulas. Everything in the inner brackets is done (calculated) first, then it moves to the next level. For every level of calculating, you need to have more parathesis.  So to make your formula work, try this:

if((and(Push , Latch, Closer), 1", 18")

You can also nest IF statments such as:

IF ( Length < 500 , 100 , IF ( Length < 750 , 200 , IF ( Length < 1000 , 300 , 400 ) ) ) Returns 100 if Length<500, 200 if Length<750, 300 if Length<1000 and 400 if Length>1000

If statments can be really confusing especially with yes/no parameters.


This user is offline

View Website

Thu, Sep 3, 2015 at 5:34:21 PM | Syntax issue: Left Parenthesis is Not Expected

#4

itsmyalterego


active
itsmyalterego Avatar

Joined: Thu, May 28, 2009
829 Posts
4 Stars: 16 Votes


So, I see your problems. two issues, your formula won't do what you want, and the error you got about the parathesis is about your second to last ).  syntax words like this: IF(X), true , false.  You have to leave the true/false results "clean" and merely separated by a comma.  That comma is the entire backbone of your formula.

 

=if(Push (and(Latch, Closer, Approach Direction = 1), 1'),18")

 

should read 

 

=IF(AND(Push , Latch , Closer , (Approach Direction) = 1) , 12" , IF(AND(Latch , Closer , (Approach Direction) = 1 , NOT(Push))) , 18" , IF(AND(Push , NOT(Latch) , NOT(Closer))) , 0" , 18"))

 

Okay.  That's a really rough stab at it.

 

Here's the logic of it written out:

if push, latch, closer, and appraoch direction = 1 are all true, set to 12"... if everything is true but NOT push, set to 18", if it isn't the first configuration, if it isn't the second configuration, but push is checked and NOT latch and NOT closer, set to 0"... but if the THIRD option isn't even true, default to 18".

 

I don't know how you want to end it.  You could leave off the entire last "IF(AND(Push , NOT(Latch) , NOT(Closer))) , 0" , 18"))" and replace it with 0" if you KNOW that you only have your three conditions.

 

hope that helps.  

 



Edited on: Thu, Sep 3, 2015 at 5:45:38 PM

This user is offline

 

Search this ThreadSearch this Thread | Page 1 of 1 |



Similar Threads

Thread/Thread Starter

Forum

Last Post

Replies

Way around circular formuala references?

Revit Building >> Technical Support

Mon, Nov 18, 2013 at 10:43:21 AM

0

Formula Syntax for PI

Revit Structure >> Technical Support

Thu, Sep 13, 2012 at 6:20:34 PM

6

What is the syntax error in this pattern

Revit Building >> Technical Support

Sun, Sep 27, 2009 at 11:25:25 AM

2

If you are having cloud rendering issues "Bug"

Revit Building >> Tips & Tricks

Mon, May 20, 2013 at 3:40:19 PM

2

Spot Dimension

Revit Building >> Technical Support

Fri, Jan 20, 2006 at 11:23:28 AM

0

Site Stats

Members:

1990789

Objects:

22877

Forum Posts:

152180

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

Login

User Name:

Password:

Remember Me  

Forgot Password?

Search Forums

Advanced Search

Search Forums

Advanced Search


Clear Highlights


Clear Highlights