Announcement

Collapse
No announcement yet.

Controlling Visibility + Length through formula

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

    Controlling Visibility + Length through formula

    I'd like to be able to automatically change a Length parameter depending on a Yes/No Visibility parameter - YES returns the length and NO returns 0.

    What I want is basically this: <length> = if( <yes/no>, <length>, 0) - this formula doesn't work because there's a circular chain so I was wondering if there's a way around this.

    Thanks in advance.

    #2
    You need a Yes/ parameter , let's say we call it Y
    Then a parameter for the formula. say called L
    then a parameter for the lenght. called Lenght

    In the formula for L you type = if(Y, Lenght, 0 mm)

    The problem is when you get 0 the family ussualy breaks, I don't know what you want to use it for but it should be what you requested.

    Comment


      #3
      You can't have modeled elements 0, it will create errors and cause the family not to work. Do you just want the family to report that the length is 0, or do you want the reference planes that control an element to move to where they don't artificially increase the families size when in the project?

      Both would require an additional length parameter, so the length formula Alecsx gave you would use the "display" length (not attached to element) and the then there would be another one controlling the modeled element: length_real=if(Y, Length, 2mm) or something similar.

      If you explain what your family is and/or provide screenshots it makes it easier to answer your question as it relates to what you are trying to do, rather than just giving a more general answer.
      Julie Kidder
      Architect + BIM Director
      Hartman + Majewski Design Group

      Comment


        #4
        I probably should have mentioned that the Length parameter is controlling 2 Reference Planes.

        L and Length will end up being the same because I need the Length parameter to measure the distance between the planes and the L parameter to control it, which means, both will be referencing the exact same Reference Planes. In these situations, Revit either breaks, issuing a warning for model overconstraint, or it accepts the older parameter but only as a reporting value and thus not usable for formula definition.

        Comment


          #5
          It would help to have screen shots or the model to better understand what you are trying to do. Do those reference planes control the size of any element? It sounds like one of your parameters should not be attached to any reference planes (Length, in Alecsx' formula) and L should drive the reference plane.
          Julie Kidder
          Architect + BIM Director
          Hartman + Majewski Design Group

          Comment


            #6
            I had not seen your post when I posted my last comment. Attaching the 2nd Length to the element worked perfectly. You were also right in that I can't have an extrusion with 0 thickness so I gave it a 0.1mm value.

            This setup was for a customisable Steel Connection plate with bolts. I've added a visibility parameter to the plate in case I just want the bolts, and I want the bolt heads to automatically adjust their positioning from the face of the plate, where they previously were, to the face of the host where they should be now.

            Anyway, thank you for your help.

            Comment

            Related Topics

            Collapse

            Working...
            X