Announcement

Collapse
No announcement yet.

Create a family warning

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Create a family warning

    Hi all,

    I have done a quick search here but could not find exactly what U was looking for.

    What I need is to create a warning in a family when the constraints are not met. For example, we have some doors that can not be any wider that 600mm. So I want to create a formula to tell the user that if a value is entered larger than 600mm the family can not be created.

    I am pretty sure this is possible. I just cant seem to figure it out.
    Andrew Harp
    BIM Manager GHD
    If you are not willing to learn, no one can help you.
    If you are determined to learn, no one can stop you.

    #2
    You need a generic annotation family, with one label (text), such as "warning". Then, nest this family into a door family. In the door family, create a text parameter such as "Warning". Tie "warning" to "Warning". Then make:
    Code:
     Warning = if(Width > 600 mm, "Invalid width!", "")
    Then, create a yes/no visibility parameter for the nested label, such as "See warning". Then make:
    Code:
    See warning = Width > 600
    Therefore, the label will stay invisible so long as the door width is less than or equal to 600. Otherwise, the label will show up, saying "Invalid width!".
    Attached Files
    Freelance BIM Provider at Autodesk Services Marketplace | Linkedin

    Comment


      #3
      Thanks Alfredo,

      That is exactly what I was looking for.
      Andrew Harp
      BIM Manager GHD
      If you are not willing to learn, no one can help you.
      If you are determined to learn, no one can stop you.

      Comment


        #4
        But the warning will be visible only if the door is tagged. Alternatively you could constrain the width with a formula to the maximum width. So no warning, but the dor can't exceed limits.
        [email protected]

        http://4revit.com

        Comment


          #5
          I usually skip the Generic Annotation, and just use a piece of geometry, e.g. a Semitransparent Box, or a Model Text, and tie that to a yes/no parameter like Alf did: Warning = Width > 600
          Sometimes I even create a second parameter to ensure that the Width will never exceed 600 mm, even if the user choose to ignore the warning: True Width: if(Width > 600 mm, 600 mm, Width)
          See the attached example :beer:
          Attached Files
          Klaus Munkholm
          "Do. Or do not. There is no try."

          Comment


            #6
            Originally posted by Munkholm View Post
            I usually skip the Generic Annotation, and just use a piece of geometry, e.g. a Semitransparent Box, or a Model Text, and tie that to a yes/no parameter like Alf did: Warning = Width > 600
            Sometimes I even create a second parameter to ensure that the Width will never exceed 600 mm, even if the user choose to ignore the warning: True Width: if(Width > 600 mm, 600 mm, Width)
            See the attached example :beer:
            Should we incorporate this in the RFO families too? We could add it as a nested component.
            Martijn de Riet
            Professional Revit Consultant | Revit API Developer
            MdR Advies
            Planta1 Revit Online Consulting

            Comment


              #7
              Originally posted by dalmore View Post
              But the warning will be visible only if the door is tagged. ...
              ??? Not true. There is no tag in this case. It's just a label, which becomes visible only if the width exceeds the limit.
              Freelance BIM Provider at Autodesk Services Marketplace | Linkedin

              Comment


                #8
                sorry, then I missed that point. Forget my posting then ...
                [email protected]

                http://4revit.com

                Comment


                  #9
                  Why have a warning? You could just set it as a minimum. The way I used to do it with medical families was to have an instance parameter that would control the lenght, but when ever the length got less that 8' it would just stay at 8'.

                  Comment


                    #10
                    Originally posted by gdoherty0102 View Post
                    Why have a warning? You could just set it as a minimum. The way I used to do it with medical families was to have an instance parameter that would control the lenght, but when ever the length got less that 8' it would just stay at 8'.
                    See post #5 by Klaus
                    Gonçalo Feio
                    "Ignorance, ignorance, sheer ignorance - you know there's no confidence to equal it. It's only when you know something about a profession, I think, that you're timid and careful." George Orson Welles

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X