Page 44 of 44 FirstFirst ... 344041424344
Results 431 to 440 of 440

Thread: Revit Formulas for "everyday" usage

  1. #431
    Forum Addict GMcDowellJr's Avatar
    Join Date
    December 21, 2010
    Location
    Phoenix, AZ
    Posts
    2,800
    Current Local Time
    05:43 AM

    Not allowed! Not allowed!
    IF ( AND(Foot_Length > 0', Foot_NS ), 1<2, 1>2)

    Remove the =1 and you should be fine.

  2. #432
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    3,293
    Current Local Time
    07:43 AM

    1 Not allowed! Not allowed!
    Not in front of Revit right now, but is the "IF" even necessary?
    I *think* you can just say:
    AND(Foot_Length > 0', Foot_NS )
    The AND returns a True of False to the If, so there's no reason it can't just return the same as the final value.
    (Didn't check the logic, either)

  3. #433
    Forum Addict GMcDowellJr's Avatar
    Join Date
    December 21, 2010
    Location
    Phoenix, AZ
    Posts
    2,800
    Current Local Time
    05:43 AM

    Not allowed! Not allowed!
    Absolutely correct

  4. #434
    New Member
    Join Date
    April 14, 2020
    Posts
    1
    Current Local Time
    08:43 PM

    Not allowed! Not allowed!
    can someone help me with this? I wanted to make a table for electrical load with wire sizes and all. This is my syntax.
    if(CB = 20, 3.5, if(CB = 30, 5.5, if(CB = 40, 8, if(CB = 60, 14, if(CB = 70, 22, if(CB = 90, 30, if(CB = 100, 38, if(CB = 125, 50, if(CB = 150, 60, 100)))))))))

    Click image for larger version. 

Name:	incosistent units.png 
Views:	35 
Size:	127.6 KB 
ID:	38681

  5. #435
    Moderator cellophane's Avatar
    Join Date
    August 9, 2011
    Location
    Louisville, KY
    Posts
    6,389
    Current Local Time
    08:43 AM

    Not allowed! Not allowed!
    cwasher made a pretty good post on calculations for roofing here: https://revitforum.org/showthread.ph...Ridge-Cap-TRIG!

  6. #436
    Moderator cellophane's Avatar
    Join Date
    August 9, 2011
    Location
    Louisville, KY
    Posts
    6,389
    Current Local Time
    08:43 AM

    Not allowed! Not allowed!
    Quote Originally Posted by ArkiTupas View Post
    can someone help me with this? I wanted to make a table for electrical load with wire sizes and all. This is my syntax.
    if(CB = 20, 3.5, if(CB = 30, 5.5, if(CB = 40, 8, if(CB = 60, 14, if(CB = 70, 22, if(CB = 90, 30, if(CB = 100, 38, if(CB = 125, 50, if(CB = 150, 60, 100)))))))))

    Click image for larger version. 

Name:	incosistent units.png 
Views:	35 
Size:	127.6 KB 
ID:	38681
    This might help: https://revitforum.org/showthread.ph...eutralize-them

  7.    #437
    New Member
    Join Date
    May 8, 2014
    Posts
    2
    Current Local Time
    12:43 PM

    2 Not allowed! Not allowed!
    Even/odd number problem
    In Revit, if you want to test if a number n is even or odd, you can use the following formula:

    if(roundup(n/2) = rounddown(n/2), "even", "odd")


    see also:

    Using even/odd functions to find out if an number is even, odd, integer or exactly half

    In Revit, for example, cosine function can do the trick of determining if a number is even or odd (since cosine is even function itself):
    if (cos(n * pi (or 180░)) = 1, "even", "odd")

    Both cosine and sine can be used to tell you if something is exactly half or an integer, for example:
    if (cos(n * pi (or 180░)) = 0, "exactly half", "not half")
    if (sin(n * pi (or 180░)) = 0, "whole number / integer", "not an integer")

    // pi or 180░ depends on your angle settings in Project Units dialog
    Last edited by mirko.jurcevic; May 7th, 2020 at 01:45 PM.

  8.    #438
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    3,293
    Current Local Time
    07:43 AM

    2 Not allowed! Not allowed!
    Nice tip, Mikrko!

    Looking back at the posts above, I noticed how difficult Arki's formula is to read. Not to mention it's nearly impossible to match Parentheses
    if(CB = 20, 3.5, if(CB = 30, 5.5, if(CB = 40, 8, if(CB = 60, 14, if(CB = 70, 22, if(CB = 90, 30, if(CB = 100, 38, if(CB = 125, 50, if(CB = 150, 60, 100)))))))))

    Enter every programmer's favorite editor: Notepad++
    Copy/Paste your formula into Notepad++, put your cursor over a parenthesis and it will show you it's match. (Notice the red highlight?)
    Click image for larger version. 

Name:	Match Paren long.JPG 
Views:	9 
Size:	21.6 KB 
ID:	38854
    I also like to indent long formulae to make them even more readable.
    Click image for larger version. 

Name:	Match Paren.JPG 
Views:	43 
Size:	34.5 KB 
ID:	38853

  9.    #439
    Forum Co-Founder Alfredo Medina's Avatar
    Join Date
    December 7, 2010
    Location
    Orlando, FL, USA
    Posts
    3,232
    Current Local Time
    08:43 AM

    2 Not allowed! Not allowed!
    Odd or Even

    To determine if an integer "n" is odd or even:

    if(-1 ^ n = 1, "even", "odd")

    Click image for larger version. 

Name:	odd or even for Revit_AM.jpg 
Views:	23 
Size:	37.8 KB 
ID:	38855

    See attached Revit family.
    Attached Files Attached Files

  10.    #440
    Moderator cellophane's Avatar
    Join Date
    August 9, 2011
    Location
    Louisville, KY
    Posts
    6,389
    Current Local Time
    08:43 AM

    Not allowed! Not allowed!
    Quote Originally Posted by DaveP View Post
    Enter every programmer's favorite editor: Notepad++
    Copy/Paste your formula into Notepad++, put your cursor over a parenthesis and it will show you it's match. (Notice the red highlight?)
    Click image for larger version. 

Name:	Match Paren long.JPG 
Views:	9 
Size:	21.6 KB 
ID:	38854
    I also like to indent long formulae to make them even more readable.
    Click image for larger version. 

Name:	Match Paren.JPG 
Views:	43 
Size:	34.5 KB 
ID:	38853
    One of the greatest programs ever made.

Similar Threads

  1. Fˇrmulas de Revit para el "uso diario"
    By Munkholm in forum Foro Espa˝ol
    Replies: 12
    Last Post: December 14th, 2017, 05:44 PM
  2. Replies: 3
    Last Post: March 18th, 2016, 10:32 PM
  3. Slab slope discrepancy btw "Slope arrow" and "Define Slope"
    By jh75 in forum Structure - General Questions
    Replies: 3
    Last Post: May 6th, 2011, 08:39 PM
  4. Revit 2011 - "Black rendering" with Non-English Win XP
    By Munkholm in forum Tutorials, Tips & Tricks
    Replies: 0
    Last Post: January 10th, 2011, 08:15 AM
  5. Replies: 2
    Last Post: January 7th, 2011, 06:19 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
  •