Parametric Array Formula

Parametric Array Formula

DrakeCanyonArchitecture
Collaborator Collaborator
5,929 Views
11 Replies
Message 1 of 12

Parametric Array Formula

DrakeCanyonArchitecture
Collaborator
Collaborator

I have a parametric array and I am trying to figure out the formula for the occasion where the array goes past a certain dimension, it would subtract one. My formula for the array is "Length/Spacing" where Length is 30' and spacing is 1'-4", which returns a Number of 23. This puts my last object outside of the 30'. I know that I can do "(Length/Spacing)-1", but that doesn't work in certain instances when the dimensions vary. I'm looking for a formula that would be along the lines of IF Spacing * Number is greater than Length, -1. <---- I know that isn't written right, I'm new to the more complex formula's.

Any resources for learning more about writing formulas would be great too, if anyone has such information.

Kevin Mendenhall
Revit Architecture 2022
Microsoft Windows 11 Professional
Dell Precision 5870 - x64 based PC - Intel Xeon CPU @ 3.80GHz, 6 Core. 80Gb RAM
Installed Add Ins - Enscape/StrucSoft MWF/LotSpec
0 Likes
Accepted solutions (1)
5,930 Views
11 Replies
Replies (11)
Message 2 of 12

barthbradley
Consultant
Consultant

See if the attached 2021 Family helps.

 

 

Message 3 of 12

barthbradley
Consultant
Consultant

You can also post what you've got and I'll modify it and return it to you.  

Message 4 of 12

DrakeCanyonArchitecture
Collaborator
Collaborator

I just came to post that I finally found a formula that works. I created a parameter that returned a value of length x spacing, which I called "count". I made another parameter that I called "Overage" that returned the value of "Spacing * Count". My final formula for my array was "if(Overage > Length, Count - 1, Count).

Kevin Mendenhall
Revit Architecture 2022
Microsoft Windows 11 Professional
Dell Precision 5870 - x64 based PC - Intel Xeon CPU @ 3.80GHz, 6 Core. 80Gb RAM
Installed Add Ins - Enscape/StrucSoft MWF/LotSpec
0 Likes
Message 5 of 12

DrakeCanyonArchitecture
Collaborator
Collaborator

@barthbradley , sorry I didn't get to this sooner and save you some time in replying. All seems to be working in my family at the moment. Can you tell refer to a good resource for learning to write these formulas? I'm finding bits and pieces of info, probably enough for my purposes if I keep searching as I go. Thank you for your time!

Kevin Mendenhall
Revit Architecture 2022
Microsoft Windows 11 Professional
Dell Precision 5870 - x64 based PC - Intel Xeon CPU @ 3.80GHz, 6 Core. 80Gb RAM
Installed Add Ins - Enscape/StrucSoft MWF/LotSpec
0 Likes
Message 6 of 12

barthbradley
Consultant
Consultant

Now that you got it figured out in that direction, how about the other direction?  What if the Array count is less than 2? Have you figured that out yet? 

 

 

 

 

Message 7 of 12

ToanDN
Consultant
Consultant
Instead of complex formula and visibility parameters to make the array works for every condition, use a curtain wall or sloped glazing with custom panels. It works for every condition, bi directionally from the get go.
Message 8 of 12

Ilic.Andrej
Advisor
Advisor
Accepted solution

What actually bothers you is the rounding of an array integer. For arrays, it is best to use a "rounddown" function. So, what is a rounddown? It rounds the number down. The round of 5.75 is 6, but the rounddown is 5.

 

So, the formula that you need is:

 

rounddown(Length/Spacing)

 

Try it.



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni

Message 9 of 12

DrakeCanyonArchitecture
Collaborator
Collaborator

@barthbradley , Good point, it does break when I enter a length of less than 3'.

@ToanDN , I started to look at curtain walls as a solution but didn't get that far into it. The end result here is actually framed walls, where there will be headers, trimmers, backing, etc. The array was actually for the studs. Is such a thing possible in a curtain wall?

@Ilic.Andrej, I will try the ROUNDOWN function. Thank you for that bit of information!

Kevin Mendenhall
Revit Architecture 2022
Microsoft Windows 11 Professional
Dell Precision 5870 - x64 based PC - Intel Xeon CPU @ 3.80GHz, 6 Core. 80Gb RAM
Installed Add Ins - Enscape/StrucSoft MWF/LotSpec
0 Likes
Message 10 of 12

Ilic.Andrej
Advisor
Advisor

You're welcome.



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni

0 Likes
Message 11 of 12

ToanDN
Consultant
Consultant

@DrakeCanyonArchitecture wrote:

I started to look at curtain walls as a solution but didn't get that far into it. The end result here is actually framed walls, where there will be headers, trimmers, backing, etc. The array was actually for the studs. Is such a thing possible in a curtain wall?


Vertical Curtain Mullions = Studs.  Horizontal Curtain Mullions = Top/Bottom Tracks, Opening Headers/Sills.

Yes Curtain Wall is the best out-of-the-box tool for this.

Message 12 of 12

DrakeCanyonArchitecture
Collaborator
Collaborator

@Ilic.Andrej, I just wanted to let you know that your solution worked perfectly. Thank you!

Kevin Mendenhall
Revit Architecture 2022
Microsoft Windows 11 Professional
Dell Precision 5870 - x64 based PC - Intel Xeon CPU @ 3.80GHz, 6 Core. 80Gb RAM
Installed Add Ins - Enscape/StrucSoft MWF/LotSpec