Results 1 to 6 of 6

Thread: Revit Variables, Formulas, Conditions...

  1. #1
    Member
    Join Date
    2005-10
    Posts
    17
    Login to Give a bone
    0

    Default Revit Variables, Formulas, Conditions...

    Hello, and thank you to everyone that may reply...

    My question is in regards to formulas, variable conditions...

    Here's what I'm trying to do...

    IF (current value > 0' 0", keep value, set value)

    Now...I'm just getting started in conditions, but have been coming from an Autocad environment... Have programmed for over 15 years... LISP, ActiveX, Object DBX...

    I don't know if all expressions, conditions, variables have been exposed on some site...or should I just ask for a total count of all allowed expressions, and formulas....

    I just want to be able to check the value entered and have it keep the value if greater than 0 (zero), if not then set the value back to the previous value or display a warning.

    I'm trying to move away from my old ways of thinking, and move toward enhancing my understanding on how Revit objects, families, have family parameters work....

    I welcome all your comments, and ask for direction on family parameters, and formula expressions, conditions, and exposed codes...

    Thank you once again.

  2. #2
    Revit MEP Moderator mjdanowski's Avatar
    Join Date
    2007-03
    Posts
    890
    Login to Give a bone
    0

    Default Re: Revit Variables, Formulas, Conditions...

    I don't believe parameters can reverence themselves, it is really a pain in the ***.

  3. #3
    Active Member
    Join Date
    2004-06
    Posts
    77
    Login to Give a bone
    0

    Default Re: Revit Variables, Formulas, Conditions...

    You should be able to type "if(value>0,value,1)"
    I don't think you could have it type any kind of error message, but you could certainly set it to a specific value.

  4. #4
    Revit MEP Moderator mjdanowski's Avatar
    Join Date
    2007-03
    Posts
    890
    Login to Give a bone
    0

    Default Re: Revit Variables, Formulas, Conditions...

    Quote Originally Posted by glynnis.patterson
    You should be able to type "if(value>0,value,1)"
    I don't think you could have it type any kind of error message, but you could certainly set it to a specific value.
    if he is trying to use the current value of the parameter though, he will get an error for circular chain of references.

    Some programming languages will let you do an equivalent script of if (A > 0, A - 1) else (A) type deal, but apparently not Revit.

  5. #5
    Revit Forum Manager Steve_Stafford's Avatar
    Join Date
    2001-12
    Location
    Irvine, CA
    Posts
    7,567
    Login to Give a bone
    0

    Default Re: Revit Variables, Formulas, Conditions...

    If you have the user provide values in separate fields you can evaluate those and do the work you need do based on that instead. You just need to separate the evaluation since Revit doesn't support evaluating the value of the parameter itself within its own formula column.

  6. #6
    Member
    Join Date
    2005-10
    Posts
    17
    Login to Give a bone
    0

    Default Re: Revit Variables, Formulas, Conditions...

    Thanks everyone...I guess there's a bit more for the wish list...

Similar Threads

  1. user variables in Revit API
    By Ning Zhou in forum Revit - API
    Replies: 6
    Last Post: 2009-07-31, 07:07 PM
  2. Revit formulas yes/no
    By SRobbins1977 in forum Revit Architecture - General
    Replies: 2
    Last Post: 2009-03-11, 03:01 PM
  3. Revit Formulas
    By Chirag Mistry in forum Revit Architecture - General
    Replies: 3
    Last Post: 2008-11-13, 09:27 PM
  4. Revit Architecture and algorithmic formulas
    By oliver.smith in forum Revit Architecture - General
    Replies: 6
    Last Post: 2007-09-19, 12:56 PM
  5. Inputting exst'g conditions in Revit - Cd's in AutoCAD
    By tim.101799 in forum Revit Architecture - General
    Replies: 1
    Last Post: 2006-06-07, 08:30 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
  •