Code Block expression help

Was saving some of this for a potential rainy day AU course, but if it helps you can look this over.

Using OOTB nodes it’s not as simple, but it is certainly doable:

Note the element queries methods can be found here: DynamoRevit/ElementQueries.cs at Revit2017 · DynamoDS/DynamoRevit · GitHub. They consist of the following:
ElementQueries.OfFamilyType(famtype);
ElementQueries.OfElementType(elemtype);
ElementQueries.OfCategory(categ);
ElementQueries.AtLevel(lvl);
Some other useful OOTB Design Script tools are gets FamilyTypes, Families, and Categories by name.
FamilyType.ByName(“60" x 30"”);
Family.ByName(“Desk”);
Category.ByName(“Furniture”);

And lastly, if you have a package which uses zero touch nodes you can call those functions and methods in the same way as you do the OOTB nodes. This means that we can call upon the power of the larger Dynamo community to expand the feature set of Design Script beyond that which comes with the initial install. Thanks to @Konrad_K_Sobon’s execellant Archi-lab package we can leverage this little number:
image

However note that this will require an extra line of documentation and confirmation that the function is in the noted package (hence the comment on the first line of the node).

7 Likes