Page 43 of 45 FirstFirst ... 3339404142434445 LastLast
Results 421 to 430 of 441

Thread: Revit Formulas for "everyday" usage

  1. #421
    Moderator DaveP's Avatar
    Join Date
    January 10, 2011
    Location
    St Paul, MN
    Posts
    3,387
    Current Local Time
    10:17 AM

    Not allowed! Not allowed!
    You don't need the =True stuff. It's even easier than that.
    If your test cases are Booleans, all you need are the parameters themselves
    OR (A,B)
    for example:
    (if (OR (A,B)), "Either is True", Both are False")
    Last edited by DaveP; March 12th, 2019 at 05:37 PM. Reason: oops; ) was in the wrong place

  2. #422
    Member
    Join Date
    October 14, 2011
    Location
    Boston, MA
    Posts
    248
    Current Local Time
    10:17 AM

    Not allowed! Not allowed!
    Quote Originally Posted by DaveP View Post
    for example:
    (if (OR (A,B)), "Either is True", Both are False")
    How I apply what you wrote here in bold. In my scenario, I have three objects each with their own viz yes/no parameter

    What I'd like to happen is,

    if A = True, then B = False
    if C = True, then B = False

    if both A and C = True, then B = True....

    but simultaneously if B = True, both A and C = False


    so far I've got B = True and B = False working

    B = True when = and(A,C)
    B = False when = not(or(A,C))


    So I made two new viz' yes/no parameters. It should work something like this I just can't get the language correct

    A' = something like if(A,B, <True>,<False>) so i'm trying to say if A = True, A' = True. But if B = True, A' = False

    C' would also be if(C,B, <True>,<False>) so if C = True, C' = True. But if B = True, C' = false

    I feel like i'm close but just can't get the viz yes/no to respond to true or false
    Last edited by billiam; March 13th, 2019 at 03:22 PM.

  3. #423
    Forum Co-Founder Alfredo Medina's Avatar
    Join Date
    December 7, 2010
    Location
    Orlando, FL, USA
    Posts
    3,244
    Current Local Time
    11:17 AM

    Not allowed! Not allowed!
    Quote Originally Posted by billiam View Post
    ...

    if both A and C = True, then B = True....

    but simultaneously if B = True, both A and C = False

    ...
    Are you sure about those two requirements together? That would be a circular reference error.

  4. #424
    Member
    Join Date
    October 14, 2011
    Location
    Boston, MA
    Posts
    248
    Current Local Time
    10:17 AM

    Not allowed! Not allowed!
    Quote Originally Posted by Alfredo Medina View Post
    Are you sure about those two requirements together? That would be a circular reference error.
    right, that's why I'm using A' and C'. which will actually control the viz of the object, sorry the confusion

    A' = if(A,B, <True>,<False>)
    C' = if(C,B, <True>,<False>)

    ..but working

  5. #425
    Forum Co-Founder Alfredo Medina's Avatar
    Join Date
    December 7, 2010
    Location
    Orlando, FL, USA
    Posts
    3,244
    Current Local Time
    11:17 AM

    Not allowed! Not allowed!
    Very complex relationships... but, anyway,... This requires Doni49's formula. (see this post for reference). Using his idea, this is possible, like this:

    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	2019-03-12_16-43-02.jpg 
Views:	541 
Size:	31.7 KB 
ID:	36098  

  6. #426
    Member
    Join Date
    October 14, 2011
    Location
    Boston, MA
    Posts
    248
    Current Local Time
    10:17 AM

    Not allowed! Not allowed!
    turns out I was able to make this work in a much simpler way, it took a bit to figure out the syntax but using A' and B' allowed me to get around the circular chain of references error. See Below

    if A = True, then C = False
    if B = True, then C = False

    if both A and B = True, then C = True....

    simultaneously if C = True, both A' and B' = False


    A (Viz control)
    B (Viz control)

    A' = IF ( and ( A, B ), not (A), A )
    B' = IF ( and ( A, B ), not (B), B)
    C (True) = and ( A, B )
    C (False) = not ( or ( A, B))


    the A' and B' is the parameter that gets applied to the object, A and B are just inputs
    Last edited by billiam; March 13th, 2019 at 03:32 PM.

  7. #427
    New Member
    Join Date
    January 2, 2017
    Location
    London
    Posts
    1
    Current Local Time
    03:17 PM

    Not allowed! Not allowed!
    I have applied logic to Tags to create some intelligents in the labels. the Tag can determine if the Duct is round or square. Whether a Duct is horizontal or vertical.

    The only addition to the list on the front of this tread is that in Tags - Labels - Calculated Values - Type - Number an If Statement can return a null number by using the square of a negative number.

    I have uploaded some Tags at the link below.

    https://drive.google.com/file/d/1bNjWVe2UH-iEnnI_tpwqF7u1DdcICbn_/view?usp=drivesdk

  8. #428
    New Member
    Join Date
    April 21, 2016
    Posts
    2
    Current Local Time
    03:17 AM

    2 Not allowed! Not allowed!
    Quote Originally Posted by rcgold23 View Post
    how about encoding at call out bubble tag?
    like i want to be like this "000102" but when i press enter it shows only "102"
    are there anyway to make like "000102"
    log() can be used to extract the number of digits from a number. log(100) = 2, log(1000) = 3, and log(108) = 2.033...

    So you can use rounddown(log(<number>)) with a series of nested if statements to get the prefix into a parameter. Then to concatenate it with the original input you would have to use a label in a tag, or concatenate in a schedule.

    if(<number>=0,"00000", if(rounddown(log(<number>))=1,"00000",if(rounddown (log(<number>))=2,"0000",if(rounddown(log(<number> ))=3,"000",if(rounddown(log(<number>))=4,"00",if(r ounddown(log(<number>))=5,"0",""))))))

  9. #429
    New Member
    Join Date
    March 2, 2017
    Posts
    1
    Current Local Time
    04:17 PM

    Not allowed! Not allowed!
    I need to build a formula for visibility of a symbol. I have already know what it should work but I have problem with writing it correctly with a formula. I have created a YES/NO visibility parameter and I would like it to be dependent from 2 other parameters:
    Foot_Lenght - Lenght Parameter
    Foot_NS - Yes/No Visibility Parameter.


    I would like to have a checkbox ticked in my parameter when Foot_Lenght is bigger than 0 and the Foot_NS parameter is checked.


    So I have presented it like this:


    IF ( AND(Foot_Length > 0', Foot_NS = 1), 1<2, 1>2)


    but it is not correct.
    Please advice.


    Thanks!

  10. #430
    Member Modderhoop's Avatar
    Join Date
    January 15, 2020
    Location
    The Netherlands
    Posts
    166
    Current Local Time
    05:17 PM

    Not allowed! Not allowed!
    Try to replace the 1<2 with 1=1
    And 1>2 with 1=2

    That might work?

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
  •