Results 1 to 9 of 9

Thread: Array Formula Problem

  1. #1
    Active Member
    Join Date
    2005-09
    Posts
    84
    Login to Give a bone
    0

    Question Array Formula Problem

    Hi All,

    I am delving into family creation, and have hit a snag in regards to arraying elements. In particular, I am trying to produce a 2 pick wall stud frame line based family with studs placed at a maximum 450mm centres.

    The problem I am having is that sometimes, the simple array formula I am using, (Length / 450mm) seems to miss a stud at the end, resulting in a greater stud spacing than the 450mm maximum spacing allowed.

    Can any Revit Guru out there help enlighten me on the best way to input my formula so that I don't have this problem?

    I am also needing assistance in how to formulate my family so that if I draw the frame shorter than my array spacing, it would only display the start and end studs, rather than telling me it can't make the type!

    I have attached the family for your information.

    I plan to also add noggings etc also, but for now I want to keep it simple and build it up from there.

    Thanks in advance!

    Ross.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    The CADSmith Chad Smith's Avatar
    Join Date
    2003-05
    Location
    Brisbane, Australia
    Posts
    1,731
    Login to Give a bone
    0

    Default Re: Array Formula Problem

    That's some level of detail you're getting into there.

    Obviously I don't know what level of documentation you are trying to get to, but typically you would model the stud wall with a Wall object, and then using a Repeating Detail you can document the studs in your view.

    I know the above doesn't directly answer your question, but maybe you are unknowingly over-complicating the issue. I could be wrong though.

  3. #3
    Active Member
    Join Date
    2005-09
    Posts
    84
    Login to Give a bone
    0

    Default Re: Array Formula Problem

    Hi Chad,

    Thanks for your input. I am also having the same array issues in regards to using 2D repeating details.

    I plan to use this family in regards to producing structural wall elevations etc, as wall bracing plays a very important part here when producing drawings for cyclonic areas.

    Ross.

  4. #4
    All AUGI, all the time clog boy's Avatar
    Join Date
    2006-12
    Location
    Probably near a PC.
    Posts
    843
    Login to Give a bone
    0

    Default Re: Array Formula Problem

    Boy that's a toughie.
    Do you want the first and second also at 450 at all times, and the last at less than 450? There are many things you could tinker with. I would tackle it like this.

    Obviously you want to divide the total length by 450. It results in a Number with decimal places. Now make a new parameter from the category Integer, which has no decimal places. Say par_Integer = par_Number - 0.45. It will always round down. par_Integer is the label for your array.

    I know what you're thinking: how about the last two? Easy. Put one at the end of the total width and align. If the gap always ends up being greater than 450, try rounding the integer up OR make a new length parameter which says "=width - (par_Integer * 450)".

    You could also justify the array to center, in that case divide the final length parameter with two and use that to constrain the first array member to the left.

    If you understand this then I would say give it a try, tinker around, and learn. It would help a massive deal if you make the stud a nested family. I have made a number of these things and I understand that setting an array up to be parametric isn't that hard. But it is (or can be) a pain to make it behave exactly how you need. Don't overcomplicate the family, don't make too many parameters but just enough not to need to make each one more complicated than a second or third person would be able to understand.

  5. #5
    Active Member
    Join Date
    2005-09
    Posts
    84
    Login to Give a bone
    0

    Default Re: Array Formula Problem

    Hi Clog Boy,

    Thanks for your asistance. To answer some of your questions, yes, I did want the first and second also at 450 at all times, and the last at less than 450. I also did put a stud at the end and aligned with that.

    I played around with the formula and realized from your comments that the calculation for the array was an integer value. So when rounding comes into effect from the resultant decimal places by dividing the length by a fixed number, I modified the equation to help tip the integer to the next whole number. eg, (Length / 450 mm) + 0.3

    This seems to have fixed the occasional missing stud.

    btw, the stud is also a nested family.

    So that's great for now! Next I need to learn how to error control the family so that it doesn't spit the dummy if I draw a short segment!

    Thanks Again for all your help!

  6. #6
    All AUGI, all the time clog boy's Avatar
    Join Date
    2006-12
    Location
    Probably near a PC.
    Posts
    843
    Login to Give a bone
    0

    Default Re: Array Formula Problem

    Quote Originally Posted by mcaddc View Post
    Hi Clog Boy,

    Thanks for your asistance. To answer some of your questions, yes, I did want the first and second also at 450 at all times, and the last at less than 450. I also did put a stud at the end and aligned with that.

    I played around with the formula and realized from your comments that the calculation for the array was an integer value. So when rounding comes into effect from the resultant decimal places by dividing the length by a fixed number, I modified the equation to help tip the integer to the next whole number. eg, (Length / 450 mm) + 0.3

    This seems to have fixed the occasional missing stud.

    btw, the stud is also a nested family.

    So that's great for now! Next I need to learn how to error control the family so that it doesn't spit the dummy if I draw a short segment!

    Thanks Again for all your help!
    Unfortunately an array always needs at least two members. So the shortest possible segment should be somewhere between 450 and 900.
    You could however opt to make it invisible for lengths shorter than 450. Then again you could make a separate family with a stud aligned left and right and no array.


    Math rules B) try writing HTML tables for a change.

  7. #7
    AUGI Addict
    Join Date
    2015-11
    Location
    Madison, WI
    Posts
    1,318
    Login to Give a bone
    0

    Lightbulb Re: Array Formula Problem

    I had a similar issue when I was building a functioning wiremold family. I wound up embedding a 'tweak' into my formula. If I knew a wiremold could have another outlet and the formula wasn't playing nice, I would force it to add one more outlet. You might want to constrain the array to the center of your wall. Below is a rough example of what your formula might look like.

    No of Studs = ((Wall Length*1') / (Stud OC Length*1')) + Stud Tweak)

    Best of luck,

    Jeff S.

  8. #8
    Woo! Hoo! my 1st post
    Join Date
    2018-06
    Posts
    1
    Login to Give a bone
    0

    Default Re: Array Formula Problem

    I have a similar issue on going , here i am trying to make a cabinet with shelves with control of array: 0 and 1 in use

    So I am looking for a solution to have 1 : shelf or 0 shelf in the cabinet, its driving me nuts that I can't get it to work with various different formulas... Can you help .. thanks in advance

    Here is the link for your reference :
    Yes it is nested I am thinking maybe its the shelves..

  9. #9
    Super Moderator dkoch's Avatar
    Join Date
    2003-03
    Location
    Philadelphia, PA
    Posts
    2,392
    Login to Give a bone
    0

    Default Re: Array Formula Problem

    Quote Originally Posted by kritika.arora769547 View Post
    I have a similar issue on going , here i am trying to make a cabinet with shelves with control of array: 0 and 1 in use

    So I am looking for a solution to have 1 : shelf or 0 shelf in the cabinet, its driving me nuts that I can't get it to work with various different formulas... Can you help .. thanks in advance

    Here is the link for your reference :
    Yes it is nested I am thinking maybe its the shelves..
    An array has to have at least two members. If your cabinet shelf options are to only have 1 shelf or no shelf, then you cannot use an array for that. You could place one shelf, and then tie its visibility to a yes/no parameter so that it either shows or does not show.

Similar Threads

  1. Array Formula Problems
    By kathey1 in forum Revit Architecture - General
    Replies: 1
    Last Post: 2011-07-22, 01:08 PM
  2. Array Formula Problems
    By mmiles in forum Revit Architecture - General
    Replies: 6
    Last Post: 2008-06-29, 10:12 PM
  3. Formula Array "Snap" to a given size?
    By jsteinhauer in forum Revit Architecture - Families
    Replies: 6
    Last Post: 2008-04-04, 05:51 AM
  4. Array IF formula...
    By L Wood in forum Revit Architecture - Families
    Replies: 3
    Last Post: 2007-08-03, 04:52 PM
  5. Array Formula ???
    By Shaun v Rooyen in forum Revit Architecture - General
    Replies: 4
    Last Post: 2005-07-26, 01:41 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
  •