Wednesday, October 09, 2013

EQ Constraint without EQ

Another question via email: "I want a column that can be defined as equal width on either side of its center line but occasionally I'd like to be able to make it unequal. Is there a way to toggle on or off the EQ (Equality) constraint in a family's dimension from the project?"

It isn't possible to toggle on/off the behavior of the EQ constraint when we apply it to a dimension string. If we ignore that feature we CAN define two parameters for either side of the center line of the column and when we need them equal we can supply the same value to both. When we need it to be unequal we just provide different values. Same result, just a different way of looking at the problem.

Here's a mockup, one way to tackle it, I'm sure there are other ways, other assumptions we could make. In the first image the Equality requirement is "OFF". The conditional statements in the formula column evaluates when the "Make Equal Width" parameter is on or off and the "Width Primary Side" parameter provides a value to define how much the inequality should be, based on a notion of primary side and secondary side width values. We subtract the "Width Primary Side" value from the "Width" parameter to shift the column over.

This next image is based on the "Make Equal Width" parameter being "ON" and we divide "Width" by 2.

1 comment:

Philip Chan said...

Good post, we have double door family that use this trick. if the user wanted a un equal door leaf for the door, they can uncheck the checkbox in the family and make a duplicate type for the size.

Philip Chan