Saturday, May 02, 2015

Optional Instance Override

Twice in one week I've seen people asking about using a Type Parameter for a door swing and wishing they could occasionally override it without making a new type for the door. That jogged my memory a bit and I remembered that Aaron Maller had told me about a technique he's used on the content he has built for Beck Group. It's quite clever, thanks Aaron!

These are the parameters you need (parameter names are italic - pick better names if you want):
  • Type parameter (Angle: Swing - this the standard angle you want to use)
  • Instance parameter (Angle: Swing Override - this is the default value for the override)
  • Instance or type parameter (Yes/No: Override Swing - this is the switch to flip)
  • Instance parameter (Angle: Swing Applied - Formula: if (yes, instance, type)
It looks like this in the Family Types dialog.


This is what it looks like applied to two door types; two are set according to their type and the other two are overridden to different angles.


This is what it looks like in the Properties Palette when a door is selected. Check the option and change the value or leave the default value.


Yes! You can have your Type and Instance too!

4 comments:

Kal said...

That's a very smart idea!
I wish I thought about it years ago...
Some will argue why you didnt let it as an instance parameter - My answer would be: if you need to have all your existing door types swing at 45 degrees then and some exception at 30 degrees then this is the solution! Thanks for sharing Steve - Hope to meeting you again in DC @RTCNA2015

Unknown said...

Hi Steve.
Is it possible to do this instance override for keynotes? I have situations where I don't want to create a new type based on just the keynote so I was wondering if its possible to do this work-around.
Thanks,
Tony

Antony McPhee said...

Sounds useful, but beware if you want to schedule the parameter. If you are scheduling by Type then the schedule will not be correct - it will report the wrong value for the parameters that have been overridden.
So only do it for parameters which are NOT going to be schedule. Like, as in the example in this post, door swing.

Steve said...

Tony Hayes - That is what User Keynotes are meant to allow for, instance "overrides" for various keynote information you need to add to something.