Is there a way to access custom View Types?

I have created several view types and am wondering if there is a way to access them in Dynamo. For example, I want to use the Filter by Boolean Mask node to narrow a list down to my “Code Plans” views. See the image below for Types of my Floor Plan views.

Based on the nodes I have (OOTB and a few packages) I do not see a way. This parameter is not showing up as a Family Type, Element Type, or simply “Type” via the Get Parameter Value by Name node.

There’s probably a more elegant way, but here’s an example (index 20 would be an extra floor plan type made for this example).

This method is pulling every view type, you may have to pre-filter the floor plan types out via the Family Name to avoid clutter.

Wow. This list is quite unorganized, even when I filter down to only Floor Plan views. For each list of level 2 items the parameters are in a different order. For one item the Type Name is index 36, for another it is index 51. Furthermore, most of the views don’t have values for Family, Type, Type Name, Family and Type, etc.

This doesn’t seem worth it.

ViewFamilyType in Rhythm will give you a drop down list for this.

I see, I did not know of that node before now.
That said, how can I use this node to filter by this parameter? I don’t see a way to connect it to the GetParameterValueByName node, nor how to use it to get a list of booleans for the FilterByBooleanMask node.
This node gives me the list of available View Types, yes, but I do not see a way to tell Dynamo that I am looking for this parameter.

Get the “Type” parameter of your views, plug them both into an == node and then FilterByBoolMask.

“Type” does not return the list in my original post’s image. It only returns blank indices or “ViewFamilyType”:

Don’t you want the ViewFamilyType? - you can then check if that matches your ‘Code Plan’ ViewFamilyType and filter correspondingly, or have I completely misread what you’re trying to do?

I want a list which provides the Type name of my views. So instead of “ViewFamilyType” in the image above, I’d like to have a list which says, for example, “Code Plan”, “50 Phase”, “30 Phase”, “Electrical”, “Code Plan”, etc.

Oh, then just get the “Type Name” of the ViewFamilyType.

1 Like

That’s getting there, now the Type names are showing up. The blank indices are sticking around though, even after using the Clean node. Evidently they are not empty items but represent some views. How do I get rid of these blank items?

I finished it. Thank you @Robert_Younger and @Hamish for your help!

1 Like