Results 1 to 2 of 2

Thread: Can't get if statement to work in Property Set formula

  1. #1
    Member
    Join Date
    2012-07
    Posts
    2
    Login to Give a bone
    0

    Default Can't get if statement to work in Property Set formula

    I'm trying to program in some information to check against our other software and I can't get an if statement to work. Any ideas?

    Code:
    If [Occupant Density (Pz)] > 0 Then
        Result=([Outdoor Air Rate (Rp)]*[Occupant Density (Pz)])+([Outdoor Air Rate (Ra)]*[BaseArea])
    
    
    Else
        Result=([Zone Population (Pz)]*[Default Outdoor Air CFM])
    
    
    End If
    For some reason though, it won't accept it.

  2. #2
    Super Moderator dkoch's Avatar
    Join Date
    2003-03
    Location
    Philadelphia, PA
    Posts
    2,392
    Login to Give a bone
    0

    Default Re: Can't get if statement to work in Property Set formula

    Looks ok, so far as one can tell from a cut and paste.

    Things to check:

    1. Are all of the items enclosed in square brackets properly created references to other properties?
    2. Are all of those property references unformatted real numbers, or are there Property Data Formats applied that add text prefixes and/or suffixes (to show units, for example)? If so, edit the formula property and, in the Enter Sample Values area, change the format applied to the property definition to one that does not add text-based prefixes and/or suffixes, to get raw numbers with which to do math.

    As the attached image shows, I was able to get a similar formula to work. I am sure the sample values I used are totally bogus, but I added some to make certain the math was done.2015-11-10_CFMcheckFormulaProperty.png

Similar Threads

  1. Property Set Formula
    By Peter Sedlacek in forum VBA/COM Interop
    Replies: 5
    Last Post: 2015-10-14, 05:33 AM
  2. 2013: Property Set Formula Help
    By libbybapa in forum ACA General
    Replies: 1
    Last Post: 2014-03-17, 10:54 PM
  3. 2012: If....Then....Else statement in Property Set Definition Help?
    By jgardner.79905 in forum AMEP General
    Replies: 1
    Last Post: 2012-07-02, 07:21 AM
  4. Formula / Boolean Statement Trouble in Schedule
    By brakware in forum Revit Architecture - General
    Replies: 3
    Last Post: 2006-11-21, 07:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •