Sunday, July 29, 2007
As some of you might be aware, when creating Revit families you can also author a type catalog to go with your family. Type Catalogs are extremely useful if you are going to have any sort of parametric family that is going to have many types. My general rule of thumb is if you need six or more types, then you need a catalog (I confess that I learned this from someone else somewhere along the way, JB, PR & others). If you want to know how to format your own basic type catalog in Revit just go the Revit Help and do a search for "Type Catalog", I promise you'll find something. In any case, while the help instructions get you started, they don't really cover everything in detail. For instance, it spells out the basic "unit" types allowed, but in their own example you can an "other" column created, which allows them to assign text strings to the "Model" parameter of their example. What I've been working on required the use of "Yes/No" parameters in the family type, furthermore, I wanted to specify the condition of the "Yes/No" in my catalog. I started with the other, and assuming that Revit simply would interpert text, I inserted Yes or No. Needless to say (otherwise I wouldn't be writing, ;) ) it wasn't that simple. When I went to load my 40 some odd types, I got 40 some odd warning messages referring to my Yes/No parameter.... hmmmmm. Well first, since Revit is always so case sensitive I changed all my "Yes" and "No"s to "yes" and "no", same problem... Then I sat back and said, hmmmmmmmmm, Revit is a computer program, and from working with Yes/No parameters in conditional formulas, I know that its really a binary switch (hang on there, I know I'm delving into compturese....), which really means, even though in a schedule Yes/No's show as "Yes" or "No" as far as the computer & Revit are concerned, its really, true or false and if its really true or false, that means its a "0" or "1", just like computer programming. Soooooo, I decided to put 0's and 1's into my Type Catalog. Bang!! It worked perfectly! My types came in without any warnings, and the Yes/No parameter was "thrown" correctly, ie Yes or No where needed. This little un-documented bit, really makes me wonder what other little things are hiding, hidden under the veil of more typical computer programming, rather then a more "user friendly" format.