I am trying to create a line based Detail Component family. I would like the array to round down if it is placed to a dimension that isn't perfect - and all I get when I place the formula for Length is the dreaded Inconsistent Units error message. Doesn't ROUNDDOWN work for dimensions?
Solved! Go to Solution.
Solved by ToanDN. Go to Solution.
Unfortunately Rounddown is Unitless. But, you can use its value in a formula for a Length value.
...maybe 3 more parameters: .
Number Parameter: Formula=Length/1.
Number Parameter2: Formula=Roundown(Number Parameter)
Length Parameter2: Formula=Number Parameter2*1'
Point conceded, @ToanDN. However I do not want it to try to place items at random spaces at the end of the array when the Length is not perfect - hence the Rounddown. Right now I have it without the Length parameter formula and it works fine for smaller distances. It's when I flex the family up to 20'+ that the fun starts. Maybe I should just sit back and accept it as is......
So @barthbradley, if I divided all the length based parameters by 1 the formula would work?
I'm saying the if the "Length" Parameter in my 1st Formula is the unvarnished, true length; the one you want to Rounddown. The 3 additional parameters will find "Length2" which is your "Length" rounded down.
....I'm responding to:
@Sahay_Rwrote:So @barthbradley, if I divided all the length based parameters by 1 the formula would work?
..So, in your case, you enter "Length2" in the formula field for "Length". Which means, you actually need a 4th parameter which has the formula you've written for "Length" minus the Rounddown. This 4th parameter becomes the "Length" parameter in my 1st formula. Confused yet?
I think the rounding is accomplished in the formula of parameter Array_Number.
you can find the "adjusted"length as follows:
Length2 = (Array_Number-1)* Array_Distance + ( 2* End + W4 )
@FAIR59wrote:I think the rounding is accomplished in the formula of parameter Array_Number.
you can find the "adjusted"length as follows:
Length2 = (Array_Number-1)* Array_Distance + ( 2* End + W4 )
Why minus 1? But, why anything? Number * Length works (e.g. 2 * 2'-0" = 4'-0").
@barthbradleywrote:
Why minus 1? But, why anything? Number * Length works (e.g. 2 * 2'-0" = 4'-0").
minus 1 to get the number of intervals in the array.
@ToanDNwrote:
I still don't understand what this entire exercise is supposed to accomplish. To report the true overall length of the Array; or to limit the length of the Line driving the Array to a nice round figure? If the former, just add a reporting parameter; if the latter, well, it seems kinda pointless.
Actually, I think it's both.
But, then again: it's all about perspective today; isn't it?
@barthbradley wrote:
@ToanDNwrote:
I still don't understand what this entire exercise is supposed to accomplish. To report the true overall length of the Array; or to limit the length of the Line driving the Array to a nice round figure? If the former, just add a reporting parameter; if the latter, well, it seems kinda pointless.Actually, I think it's both.
Then just add the reporting parameter to report the true length of the Array, then after draw the line family in project, look at the value of the reporting parameter and enter it to the Length parameter. Voila!!! Nice and round and still pointless.
@ToanDNwrote:Then just add the reporting parameter to report the true length of the Array, then after draw the line family in project, look at the value of the reporting parameter and enter it to the Length parameter. Voila!!! Nice and round and still pointless.
Ours not to reason why, ours but to do and die.
- Alfred Lord Tennyson
@barthbradley wrote:
@ToanDNwrote:
Then just add the reporting parameter to report the true length of the Array, then after draw the line family in project, look at the value of the reporting parameter and enter it to the Length parameter. Voila!!! Nice and round and still pointless.
Ours not to reason why, ours but to do and die.
- Alfred Lord Tennyson
"Thou shall not trust everything written on an internet forum."
- Isaac Newton - 1729
OMG. I stepped away for a little while and look at the resulting pandemonium!
I will take a nicely rounded - and yes, pointless - solution. Let me see if I can plug in the input from this conversation and actually reach a successful result.
@Sahay_R The roundown function creates the "Number" result but it still can be used in a formula of a length parameter.
So, this is your formula:
Length: rounddown(((Array Number/1)*Array Distance)+(2*End)+W4)
So what you have here is this:
rounddown ( (unitless/feet)*feet + square feet + feet)
This is because in length parameters, Revit assigns units to the numbers you write- so its not just 2, its 2' . Even though the rounddown turns everything into the number at the end, I'm not sure if this operation inside it can be processed. Second, lets say that it can - you still have the Number as a result - not Length.
Try this formula:
rounddown ( this operation needs to have consistent units and then whatever unit was left will be removed) * a value needs to be used to give a new unit to the final result so that Number will be turned into Length
Length: rounddown((Array Number*Array Distance+2*End/1+W4)/1)*1
rounddown ((unitless*feet + square feet/feet + feet)/feet) * feet
= rounddown ((feet + feet + feet)/feet) * feet
= rounddown (unitless) * feet
= unitless * feet
= feet
Andrej Ilić
phonetical: ændreɪ ilich
MSc Arch
Autodesk Expert Elite Alumni
@Ilic.Andrejwrote:@Sahay_R The roundown function creates the "Number" result but it still can be used in a formula of a length parameter.
So, this is your formula:
Length: rounddown(((Array Number/1)*Array Distance)+(2*End)+W4)
So what you have here is this:
rounddown ( (unitless/feet)*feet + square feet + feet)
This is because in length parameters, Revit assigns units to the numbers you write- so its not just 2, its 2' . Even though the rounddown turns everything into the number at the end, I'm not sure if this operation inside it can be processed. Second, lets say that it can - you still have the Number as a result - not Length.
Try this formula:
rounddown ( this operation needs to have consistent units and then whatever unit was left will be removed) * a value needs to be used to give a new unit to the final result so that Number will be turned into Length
Length: rounddown((Array Number*Array Distance+2*End/1+W4)/1)*1
rounddown ((unitless*feet + square feet/feet + feet)/feet) * feet
= rounddown ((feet + feet + feet)/feet) * feet
= rounddown (unitless) * feet
= unitless * feet
= feet
it was edited- I had to correct smthg.
Andrej Ilić
phonetical: ændreɪ ilich
MSc Arch
Autodesk Expert Elite Alumni
Can't find what you're looking for? Ask the community or share your knowledge.