Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Parametric Array Formula

11 ANTWORTEN 11
GELÖST
Antworten
Nachricht 1 von 12
DrakeCanyonArchitecture
4271 Aufrufe, 11 Antworten

Parametric Array Formula

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
11 ANTWORTEN 11
Nachricht 2 von 12

See if the attached 2021 Family helps.

 

 

Nachricht 3 von 12

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

Nachricht 4 von 12

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
Nachricht 5 von 12

@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
Nachricht 6 von 12

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? 

 

 

 

 

Nachricht 7 von 12
ToanDN
als Antwort auf: DrakeCanyonArchitecture

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.
Nachricht 8 von 12

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

Nachricht 9 von 12

@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
Nachricht 10 von 12

You're welcome.



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni

Nachricht 11 von 12
ToanDN
als Antwort auf: DrakeCanyonArchitecture


@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.

Nachricht 12 von 12

@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

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report