Create multiple DraftingView.ByName

I am able to create a single drafting view, but is there a way I can create multiple drafting views using the single node of DraftingView.ByName. Or would I need a node for each Drafting View that I want to create?

Hi @jmurphy

just give it a list of names:

1 Like

Mustafa, thank you so much for your reply (this is my first post!!!)

I was able to recreate your Code Block, now I’m going to try to combine these lists so they fit the same format… Any advice would be greatly appreciated.


Hi @jmurphy

One of the possible way to use Flatten node after your watch node and connect to DraftingView.ByName node.

You’re welcome!
it will work with nested list too :slight_smile: :

if you need to have a flat list for other reasons you can use Flatten node.

1 Like

I and @Mostafa_El_Ayoubi replied at same time :smile:

haha yeah you were a little faster :slight_smile:

I experimented with the code blocks shared, and it worked. Now I’m trying to use it in the original context and my file keeps crashing. I tried to upload the script, but new users do not have upload privileges. I appreciate your guys’ input. I’m including screenshots of the whole thing.

I want to create a drafting view for each unique instance of a sill mullion in an exterior (E) set of walls.

Dynamo keeps crashing when I attach my list to the “DraftingView.ByName” node.

I tried to create a string that matched the Code Block from @Mostafa_El_Ayoubi and @Kulkul but that caused a crash as well…

@jmurphy Its because your feeding the same values multiple times. Check your list it has got same names more than one. Revit doesn’t allow to create views with the same names. Hope that make sense.

1 Like

Ok, that makes sense. Thank you. How would I create these 5 views, instead of the 10 views that it was trying to create?

@jmurphy How about this?

Thank you so much for all of your help today @Mostafa_El_Ayoubi & @Kulkul. Here is what I was finally able to create so that when a mullion is put into a new wall condition it would create a new drafting view. Dynamo Rocks!