Dynamo for Revit: Category Selection

Cover.jpg

It has long been suggested to hard wire category selections into Dynamo scripts unless the user is to specify the category (it is to be an input). 

Input.jpg

 

Up until recently, the category drop-down node was unstable due to changes across versions, each new version having more categories within the list than the previous.  The category by name node was always a go-to solution for the varying quantity of categories problem. 

2022_CategoryByName.png

Selection of ceilings through the Category.ByName method within Dynamo for Revit 2022

 

Within Dynamo 2.13 for Revit 2023, however, the category by name node now may not work as expected.  The string of "Ceilings" provided as an input to the "Category.ByName" node will return "Analytical Surfaces - Ceilings" as the Dynamo output.

2023_CategoryByName.png

 

The Monocle package for Dynamo (by John Pierson) contains a drop-down conversion tool that converts any drop-down node into a renamed code block containing the necessary design script.  This is now the go-to solution for hard wiring category selections within Dynamo scripts.

converter.jpg

 

Wrap Up:  Unless providing an input for user specification of the category, ensure to hard wire category selection within Dynamo scripts using the drop-down converter by Monocle for Dynamo.