Forums
Forums >> Revit Building >> Technical Support >> Way around circular formuala references?
|
|
active
Joined: Wed, Feb 10, 2010
40 Posts
|
I have a simple box Mass family that I'm using to space planning. A shared parameter of the family is TargetArea, which is the desired footprint area of the Mass (Width * Depth). When moving a handle controlling either the Width or Depth my Mass Tag updates the area. I'm thinking it would be nice to have the option to lock TargetArea so that the Mass adjusts itself after a stretch so that its area is always the same. E.g., if the width increases, the depth decreases. A LockTargetArea Yes/No toggle would control whether this behavior was active.
I tried a simple approach to implementing this and quickly ran into a circular reference error. E.g., for Width I have the forumal
=if(LockTargetArea, TargetArea/Depth, Width)
A similar attempt sort of worked, though it took away the parameter grips, which is a deal breaker. Is there a way to acheive what I'm after?
|
This user is offline |
|
|
|
active
Joined: Wed, Sep 26, 2007
162 Posts
|
See illustration. Three parameters: "side A", "side B", and "target area". The length of one of the sides is driven by a formula. The other two parameters, one of the sides and the target area, can be changed to calculate the lenth of that other side.
-----------------------------------
Planta1 Revit Online Consulting | info@planta1.com |
This user is offline |
View Website
|
|
active
Joined: Thu, Mar 29, 2012
113 Posts
|
hi,
if youre trying to achieve is to have the width automatically calculated when locked?
and key-in/define its value when its not locked?
right? if yes see attached files.
if locked:
depth = define depth
area = define area
width = area/depth
if unlocked:
depth = define depth
width = define width
area = width*depth
-----------------------------------
** dont be mad, i dont have much... i am homeless |
This user is offline |
|
|
active
Joined: Wed, Feb 10, 2010
40 Posts
|
Guys, thanks for the responses. Alf, I had tried your approach which works OK except that it only gives grips for stretching in one dimension. The other dimensions is calculated. I was hoping to maintain the freedom of stretching in either dimension and having the other calculated, but was getting the circular references. The Lock Target Area would turn this behavior on/off.
Ron, what you proposed isn't quite what I was after but gives an interesting workaround. My custom TAG lists both the target and actual areas. I didn't want to toggle between them. But, I like the idea calculating the value to be entered to acheive the target area, like in the attached. So, if I stretch the width, the family gives the depth I need to enter to acheive the desired area, and vice versa (see attached). I can live with this. You could say I was trying to acheive this end without having to key in the value.
|
This user is offline |
|
|
active
Joined: Wed, Sep 26, 2007
162 Posts
|
"
Guys, thanks for the responses. Alf, I had tried your approach which works OK except that it only gives grips for stretching in one dimension. The other dimensions is calculated. I was hoping to maintain the freedom of stretching in either dimension and having the other calculated, but was getting the circular references. The Lock Target Area would turn this behavior on/off.
...
Well, of course, in my proposed solution, only one of the two sides is flexible, and the other one is constrained by the value of "target area". That is why I named the two sides "side A" and "side B", so that, if necessary, you could rotate the element, to make the width be the depth, or vice versa. If the two sides were flexible, the area would not be constrained to a target value.
-----------------------------------
Planta1 Revit Online Consulting | info@planta1.com |
This user is offline |
View Website
|
|
active
Joined: Sun, Jul 10, 2011
9 Posts No Rating |
I have a related question regard ing cirular references. I am having difficulty seeing what is causing it. I have had it show up a few times, and cannot reason out the cause. I've attached the family and a PDF of the proposed formula change. If anyone can help, that would be great!
-----------------------------------
setver62 |
This user is offline |
|
|
active
Joined: Wed, Sep 26, 2007
162 Posts
|
For some reason, when I click on "apply", I don't get the "circular reference" error.
However, let make a comment: you should really start working with type catalogs, family types, or lookup tables. That would really simplify your families. The set of parameters for this family is excessive for this kind of family. Most of those IF statements and visibility parameters would not be necessary if you were using those other methods that I mentioned above.
-----------------------------------
Planta1 Revit Online Consulting | info@planta1.com |
This user is offline |
View Website
|
|
active
Joined: Sun, Jul 10, 2011
9 Posts No Rating |
I have a related question regard ing cirular references. I am having difficulty seeing what is causing it. I have had it show up a few times, and cannot reason out the cause. I've attached the family and a PDF of the proposed formula change. If anyone can help, that would be great!
-----------------------------------
setver62 |
This user is offline |
|
|
active
Joined: Sun, Jul 10, 2011
9 Posts No Rating |
alf,
In the PDF, there was a line of text that I need inserted to replace the formula for a specific parameter. If you insert that text, then hit enter or apply, the cirsular reference comes up. If you did insert the text and received no error, do you have any idea why I might be receiving the error? Could this be a glitch in my installation?
As for your suggestions, I really appreciate them. IT sure is hard to think everything through that far when I start with only 5 parameters and the boss keeps having me add capabilities. And, of course, I barely know what I'm doing!
Setver
-----------------------------------
setver62 |
This user is offline |
|
|
active
Joined: Wed, Sep 26, 2007
162 Posts
|
Your PDF shows names of parameters that don't exist in your family such as:
Conduit to Rod A Int
Conduit to Rod B Int
Instead, you have some similar parameters, named such as
Conduit to Rod A (Int)
Conduit to Rod B (Int)
Notice the difference? The parenthesis. That by itself will not create a circular reference error but it might create an "invalid formula" or "parenthesis not expected" errors.
If, as you say, you "barely know what you're doing" and your boss is asking more and more of you in regards to families, maybe your boss should buy some training for you on topics of creating families. It's a win-win situation. You will learn more, he will get better families. If you are interested, I provide that service.
-----------------------------------
Planta1 Revit Online Consulting | info@planta1.com |
This user is offline |
View Website
|
|
|
active
Joined: Sun, Jul 10, 2011
9 Posts No Rating |
alf,
In the PDF, there was a line of text that I need inserted to replace the formula for a specific parameter. If you insert that text, then hit enter or apply, the cirsular reference comes up. If you did insert the text and received no error, do you have any idea why I might be receiving the error? Could this be a glitch in my installation?
As for your suggestions, I really appreciate them. IT sure is hard to think everything through that far when I start with only 5 parameters and the boss keeps having me add capabilities. And, of course, I barely know what I'm doing!
Setver
-----------------------------------
setver62 |
This user is offline |
|
|
active
Joined: Sun, Jul 10, 2011
9 Posts No Rating |
My error, I forgot to save the file before posting. The PDF does show the correct data.
-----------------------------------
setver62 |
This user is offline |
|
|
active
Joined: Mon, Mar 15, 2010
199 Posts
|
you need more parameters for both, depth and area
see attached image.
hope it helps.
-----------------------------------
want more?
You can get more tips at Enjoy Revit |
This user is offline |
View Website
|
|
active
Joined: Sun, Jul 10, 2011
9 Posts No Rating |
Regarding my request for aid yesterday, with attached family and PDF, please disregard. I found the circular reference this morning.
-----------------------------------
setver62 |
This user is offline |
|
|
|
Similar Threads |
Wish List - Kill Circular Chain of references |
General Discussion >> Wishlist
|
Thu, Apr 10, 2008 at 1:51:30 PM
|
2
|
Circular chain of events |
Revit Building >> Technical Support
|
Mon, Sep 11, 2006 at 9:23:06 PM
|
1
|
"Chain of Circular References" |
Revit Building >> Technical Support
|
Mon, Nov 13, 2006 at 8:13:43 AM
|
1
|
There is a circular chain of references among the highlighted elements. |
Revit Building >> Technical Support
|
Tue, Aug 30, 2005 at 4:56:01 AM
|
1
|
Circular chain of refenrences (Yes, another one...) |
Revit Building >> Technical Support
|
Tue, Jun 21, 2011 at 12:35:49 PM
|
5
|
|
|
Site Stats
Members: | 2056212 | Objects: | 23069 | Forum Posts: | 152281 | Job Listings: | 3 |
|