Results 1 to 9 of 9

Thread: Spacing parameter in a nested array

  1. #1
    All AUGI, all the time J. Grouchy's Avatar
    Join Date
    2003-12
    Location
    Quhl Whirled
    Posts
    896
    Login to Give a bone
    0

    Default Spacing parameter in a nested array

    How do I go about assigning a "maximum spacing" distance parameter to an array in a family? I would like the object to space equally within a given distance, but never more than a certain distance apart from each other.

  2. #2
    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: Spacing parameter in a nested array

    Quote Originally Posted by grav8e
    How do I go about assigning a "maximum spacing" distance parameter to an array in a family? I would like the object to space equally within a given distance, but never more than a certain distance apart from each other.
    You need to provide the family with a way to resolve the problem.

    Basically you need something like: If spacing > x then increase array count value by x.

    The trick is the count value could be so small that even a single increase is too little to fix the problem. So you might need to nest the logic to work out the. You might also try to work out the spacing based on the width first then use the results to assign values to parameters that flex the array.

    Give it a go and let us know how you do.

  3. #3
    I could stop if I wanted to funkman's Avatar
    Join Date
    2003-10
    Location
    Sydney, Australia
    Posts
    437
    Login to Give a bone
    0

    Default Re: Spacing parameter in a nested array

    Hi grav8e

    see this and Mr Spot's helpful response... http://forums.augi.com/showthread.php?p=97064#post97064

  4. #4
    Aussie Revit Moderator Mr Spot's Avatar
    Join Date
    2004-05
    Location
    Brisbane
    Posts
    1,115
    Login to Give a bone
    0

    Default Re: Spacing parameter in a nested array

    I might also add this is very difficult to achieve because there is no way to specify how Revit rounds a value.

    For instance, say you have a width of 4800mm window and the maximum span for mullions is 1200mm.

    You could create a formula to calculate how many mullions to have given this maximum span;

    no of mullions = (Width/Maximum Span)+1 (Note: I'd typically use an IF parameter to make sure number of mullions can never equal 1.)

    This would give you 5 mullions at 1200mm spacing (+1 because there is one more mullion than the actual panels)

    But if your width is 5000mm, the actual number of mullions should be 5.116, revit will round this to 5 and therefore your maximum spacing is now broken.

    We need a way of making revit always round up in this situation! I think there is a really awkward workaround, just wish it was a little easier.
    Chris Price
    Co-Founder/BIM Manager/Product Designer
    Xrev Pty Ltd

    Revit Rants BLOG

  5. #5
    Revit Founder LRaiz's Avatar
    Join Date
    2003-07
    Location
    Newton, MA
    Posts
    714
    Login to Give a bone
    0

    Default Re: Spacing parameter in a nested array

    Would the following modification of Mr. Spot formula work for you in huge percentage of cases?

    Count = Width / MaxSpacing + 1.9999

    Notice that I use 1.9999 instead of 1.0 (more 9s works even better)

    If Width is a multiple of MaxSpacing then 0.9999 becomes irrelevant because assignment to integer parameter does the round off. Otherwise extra 0.9999 does the trick of not going over MaxSpacing. Besides, unless Width < 0.0001 * MaxSpacing resulting Count is at least 2.

  6. #6
    Aussie Revit Moderator Mr Spot's Avatar
    Join Date
    2004-05
    Location
    Brisbane
    Posts
    1,115
    Login to Give a bone
    0

    Default Re: Spacing parameter in a nested array

    LRaiz,

    you lost me there? If i then put in those values sure it won't break the max spacing ever... But it also want give you the most correct answer...

    For instance if i then substitute my values from the example before into your formula you would now have 6 mullions when given the maximum spacing you could actually get away with 5...
    Chris Price
    Co-Founder/BIM Manager/Product Designer
    Xrev Pty Ltd

    Revit Rants BLOG

  7. #7
    Aussie Revit Moderator Mr Spot's Avatar
    Join Date
    2004-05
    Location
    Brisbane
    Posts
    1,115
    Login to Give a bone
    0

    Default Re: Spacing parameter in a nested array

    Quote Originally Posted by grav8e
    How do I go about assigning a "maximum spacing" distance parameter to an array in a family? I would like the object to space equally within a given distance, but never more than a certain distance apart from each other.
    Sorry if i am confusing anyone.

    To go about it you would use array to last, then edit the label for the array and add a parameter for the integer. Then go to your family types and add another length parameter for maximum span. (there is no need for this parameter to be associated to any dimension string as it is for the purpose of the above formula only.

    HTH.
    Chris Price
    Co-Founder/BIM Manager/Product Designer
    Xrev Pty Ltd

    Revit Rants BLOG

  8. #8
    Revit Founder LRaiz's Avatar
    Join Date
    2003-07
    Location
    Newton, MA
    Posts
    714
    Login to Give a bone
    0

    Default Re: Spacing parameter in a nested array

    Quote Originally Posted by Mr Spot
    LRaiz,

    you lost me there? If i then put in those values sure it won't break the max spacing ever... But it also want give you the most correct answer...

    For instance if i then substitute my values from the example before into your formula you would now have 6 mullions when given the maximum spacing you could actually get away with 5...
    It appears that I made a wrong assumption that assignment of floating point number to an integer simply drops the fractional part. Experiments seem to indicate that current behavior rounds off to the nearest integer instead. In that case how about?

    Count = Width/MaxSpacing + 1.4999

    If MaxSpacing = 1200mm then
    Width = 4800mm -> Count = Roundoff(5.4999) = 5
    Width = 5000mm -> Count = Roundoff(5.6666) = 6

  9. #9
    Aussie Revit Moderator Mr Spot's Avatar
    Join Date
    2004-05
    Location
    Brisbane
    Posts
    1,115
    Login to Give a bone
    0

    Default Re: Spacing parameter in a nested array

    Cool

    That makes more sense.
    Chris Price
    Co-Founder/BIM Manager/Product Designer
    Xrev Pty Ltd

    Revit Rants BLOG

Similar Threads

  1. Parametric Array spacing control
    By DoTheBIM in forum Revit Architecture - Families
    Replies: 13
    Last Post: 2018-06-13, 05:21 PM
  2. 2013: Array with progressive rotation and spacing
    By libre in forum Revit Architecture - Families
    Replies: 0
    Last Post: 2013-04-05, 04:56 PM
  3. 2012: Nested families with Array Parameter
    By nt0173us in forum Revit Architecture - Families
    Replies: 1
    Last Post: 2012-09-10, 11:14 AM
  4. Parametric Array spacing control
    By DoTheBIM in forum Revit Architecture - General
    Replies: 7
    Last Post: 2007-04-19, 12:56 AM
  5. Array with Variable Spacing
    By ajayholland in forum Revit Architecture - Families
    Replies: 1
    Last Post: 2005-05-15, 10:21 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
  •