Place multiple views on sheet

I have been playing around with an excel spreadsheet which has the info for creating a sheet, then placing views on the sheet. I have managed to write a script that works to create a sheet and placing one view on that sheet, but when i change the node from “sheet.bynamenumbertitleblockandview” to “sheet.bynamenumbertitleblockandviews” (Plural) my problem is that my second view from my excel spreadsheet does not get placed on the correct view. In fact all views get placed on my first sheet with this script. Any idea what i would need to change?

Hi @gazza23

Can you show us the graph?
It makes it a lot easier for us to find a solution for you.

I will reply a couple of times to attach 2 screenshots - the first is my single view placed on a sheet which works. The second is multiple views which doesnt work


here is the excel spreadsheet

Can you please enable all previews?

It seems no information is being read from your transpose or your viewplan nodes :slight_smile:

See below. I know there is something wrong here, just not sure why it was so easy to get one view to work, but adding another view from a different cell doesn’t want to work :frowning:

can you upload the .dyn, cannot stand the jumble of spagetti :slight_smile:

You can use the camera icon in the top right corner to capture pictures of the entire graph if you have squished it all together for that reason :slight_smile:

What does the error say?


Ctrl+L untangles this spiderweb


Haha sorry I was originally writing it on my 15 inch laptop and had to get everything to fit on the screen. Being a new user I still cant upload my script, but have made it easier for you to read (bothcamera and ctrl L were new to me - thanks!)The error says asked to convert non-convertible types. Again I don’t know why this is so much harder than placing a single view…

1 Like

Understand the problem, that is why the camera icon is gold (you can simply zoom in on a single node if required and press it and it will still give you a complete picture of your graph) :slight_smile: This is much easier to read thanks :wink:

Your problem is probably that you’re passing your values from excel to the input that expects a view element :slight_smile:

Ah I see. What I don’t understand is, the last node is asking for “Views” But you can only have one input into this views node. How do I get the last two column from excel to be read, as opposed to just one column? Assuming that is the issue that wont let me place the second sheet

I have no idea what you’re asking…

Please enable all previews on your graph (think somethink funny is up with you list.contains node).

Sorry - attached new script after deleting the nodes you mentioned. So just to let you know, the script is currently creating 16 sheets, which is correct. However it is taking 16 views (from the third column in excel; and putting them all on the FIRST created sheet, rather than the relevant sheet as specified in excel) and it is also not putting the 16 views from the fourth column in excel anywhere. I believe maybe my second code block should read something like “2…3” instead of just “2”? But I still have the error of all views going on the first sheet.

You have to organize your list of views so you have a list of views that go on the first sheet, a second list of views that go to the second sheet.
GroupByKey might be the node you want for creating a list with sublists

Also, when using the camera icon it is important that you can see the node names yourself, otherwise we will not be able to either :wink:

Haha wow it’s really just one of those days… Proper screenshot attached

I have managed to get one step closer - I now have my two lists showing the correct drawings. Dynamo is creating my 16 sheets but instead of placing one view from each list on each sheet (so 2 views per sheet total) it is placing the views from my first list all on my first sheet, and the views from my second list all on my second sheet. Any idea how to get the views placed on the corresponding sheet from excel?


You need to have a sublist of views for each sheet they belong to (this is why what you currently have placed one list on the first sheet and the other on the second). Add a List.Transpose after your List.Create and connect that to your views input.