How to get around Circular References

Anonymous

How to get around Circular References

Anonymous
Not applicable

Hello,

 

Just looking for a clever way of doing the following:

I have a parametric conveyor family. I want it to be definable by either length, height, or angle. However, I can only have two independent variables and a third dependent. 

 

Please see below: I have created pseudo variables under Dimensions, which are meant to be used for quick calculations for inputting dimensions. It seems over complicated though and not user friendly. 

Annotation 2019-06-11 114652 Parametrics.pngAnnotation 2019-06-11 114713 3D.png

Could someone please advise on a better/simpler way to go about it?

Thanks,

Connor 

0 Likes
Reply
Accepted solutions (1)
904 Views
5 Replies
Replies (5)

barthbradley
Consultant
Consultant

Not sure I understand what you are looking for.  Sounds like you need a trigonometric equation to solve for a length or an angle of a right triangle. What exactly do you need to solve?  In order to solve for Adjacent side or Opposite side or Hypotenuse or Angle (0 or cx), you must know the value of at least two of the four.   

 

right triangle.png

 

...all the formulas you need are found here.

 

https://www.revitforum.org/tutorials-tips-tricks/1046-revit-formulas-everyday-usage.html

ToanDN
Consultant
Consultant
You could create it in the project as a roof with columns attached tote underside / constrained to the edges.

Ilic.Andrej
Advisor
Advisor
Accepted solution

To get around circular references you need to segregate the user input parameter from those that actually constrain the geometry.

 

Length, Height and Angle could all be variables. It all depends on what user wants to change.... But how could a computer know what to create when all you give him is variables? You need to use another parameter that will set the priority (define which parameters will be variables in formulas).

 

This is a simple example where I set two potential variables: 

1. Angle & Height

2. Angle & Length

 

By clicking "Lock Height", I say:

"Angle and Length will be variables, otherwise Angle & Height will be variables"

 

I could take a step further where I say: "Length is a variable, Angle is a variable, Height is a variable" but that would complicate formulas so much, you wouldn't understand anything....+ it would take much more time to do it. So if you understand this simple concept, you could go further, explore about formula nesting and step by step try to make all three options for variables...

 

Untitled.jpg

 

 



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni

0 Likes

Anonymous
Not applicable

@ToanDN the idea is to have a reusable family that can easily be loaded into projects. Therefore the roof option isn't ideal.

 

I ended with something I'm happy with.

 

Say I have a Conveyor.AngleDesired = 15°, Conveyor.Length = 6232.5mm and Conveyor.ΔHeight (height of slope) = 1670mm:

1.png

 

 

and I am told that the maximum Angle of Inclination (Conveyor.AngleDesired) allowed is 10° and it must be a length of 7500mm, I can input these values:

2.png

 

From the above I do not know what Conveyor.ΔHeight will be unless I use a calculator, but instead I can refer to Conveyor.ΔHeightRequired and change the value of Conveyor.ΔHeight to be the same.

 

This will then cause Conveyor.AngleActual and Conveyor.Length to be equal to their greyed out associates.

 

Yellow = input

Green = output

3.png

 

The same method can be used if you have Height and Angle, or Height and Length. I think this works quite well and is rather straight forward to use.

 

Edit: @Ilic.Andrej your reply came in after my response. Your solution is elegant and better than mine! Quite bleak that I didn't think of that... I'm going to give the three-variable thing a shot for fun, and may get back to you if I get stuck.

 

Thank you all and kind regards,

Connor

Ilic.Andrej
Advisor
Advisor

Edit: @Ilic.Andrej your reply came in after my response. Your solution is elegant and better than mine! Quite bleak that I didn't think of that... I'm going to give the three-variable thing a shot for fun, and may get back to you if I get stuck.

 

Thank you all and kind regards,

Connor


 

If you really want to have some fun and make it sexy, find and read this amazing reply from @SteveKStafford . If you follow that procedure, you will end up having an awesome dropdown parameter that determines what will be the variable.



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni