Does anyone know how to follow up the definition of a codeblock that defines categories, with the codeblock equivalent of All Elements Of Category? For instance:
[Category.ByName(“OST_Walls”);] - [“All Elements Of Category” node]
I can obviously plug this in to the “All Elements Of Category” node, but I’m looking for an all CB way of doing this. Any ideas or thoughts would be appreciated!
As stated above, “All Elements of Category” can’t be used as a function. Tho you can do the next best thing and wrap it inside a custom node. That way you could do something like the below:
I wrote this quite a while ago. You can actually streamline this further, by using the underlying ZT method ElementQueries.OfCategory (for Dynamo 2+). It should also work in imperative code: