Create View from Excel

Create View from Excel.dyn (38.9 KB) [Project View List.xlsx|attachment]
(upload://dTt2RJ3gAc5Oq3boesavluJW8Sb.xlsx) (8.1 KB)
I am trying to build a graph that will create Views and assign View Templates based on lists from Excel. I am modifying a graph which I downloaded from a link on YouTube.
The Good News is, the Graph Works. I would like to scale up the Graph to operate on a list of multiple Views.
The bad news is, I don’t fully understand how it works. If I can’t explain what every node is doing, I don’t think I should use the graph.
Please see Group 3 in the attached graph. Why are the nodes labelled Node 1 and Node 2 necessary? I tried to wire directly from the list Transpose and there were multiple warnings with no output. So, I understand that these Code Blocks are somehow transforming data. Thanks for any suggestions.

Hey that is a great question, i’ll take a look at your script and i will try to explain it to best of my knowledge :slight_smile:

The best way for me to explain this is by giving a good example! This first code block (1) is splitting the data from the list.transpose node into three outputs. Basically this node is using designscript instead of the “List.Getitematindex” node, see my screenshot below:

The second code block is just a throughput of data, but the data is not altered in any way. I mostly use this to make sure no lines overlap in my graph. See image below:

I hope this cleared those nodes up for you :slight_smile:


Thanks for your reply earlier today. I see from your sample graph how I could use a code block rather that the combination of the Number & Get Item at Index to
selectl items from a list. There are still some things about the graph I pasted in my original message that I don’t understand. Generally speaking, I’m trying to understand what category the data in the list from Excel belongs to, and how that data is translated
to a category the Input Ports in other nodes will understand. More specifically;

In Group 3, Node 1, the Output ports say “Value of expression at Line xx” Is the data Strings at this point? The Data.ImportExcel node is set not to read information
as strings.

In Group 3, Node 2, what are Levelref and viewname?


This is the description for Node 1 and Node 2:


What does authoring code mean? Is this the boilerplate description for all Code Block nodes?

In Group 3, what purpose does the List.Map node serve? Why is another list necessary?

As shown below, why is Index 0, not index 2, reading the correct information?

Finally, I have included information in the spreadsheet to populate the View Parameter, “Title on Sheet”. I believe “Title on Sheet” is a View Parameter, not
a Title Block parameter. I’ve tried to use the SetParameterbyName node, but I get an error that the Parameter I name, (Title on sheet), can’t be found. I’ve tried using a String node and a Code Block, and neither work. I’ve selected the View Element. Is this
not correct?

Sorry for the Marathon message, but I’m hoping by including all my questions, I’ll reduce the length of this thread.



1 Like

Hi Jim,

I will try to explain every question in an order by question and answer :slight_smile:

Q1: “In Group 3, Node 1, the Output ports say “Value of expression at Line xx” Is the data Strings at this point?”
A1: No the data is not altered to string by this node, it is just split from 1 input, into three seperate lists. You could also easily use only 1 input line instead of three as done in your script:

These two images output the exact same information.

Q2: “In Group 3, Node 2, what are Levelref and viewname?”
A2: This is the name the original creator of this script named these inputs, you can name these any way you want, but in this case it is named this way so you can easily identify what each input/ output is. How you name these inputs does not matter, it will not change the way how this node works.

Q3: “What does authoring code mean? Is this the boilerplate description for all Code Block nodes?”
A3: Authoring code means that you can directly write in DesignScript Code. Each Code Block node that is created uses DesignScript. And for the second question, yes it is de normal description.

Q4: “As shown below, why is Index 0, not index 2, reading the correct information?”
A4: This probably has something to do with how your input is build, i unfortunately do not have your Excel-file so i dont know the exact data that should be flowing through. But you should check out list levels and lacing to use in your script.

Q5: (Something about different parameter types)
A5: Could you share your Revit file so i can take a look? (together with a sample Excel)

I hope this clears everything up :slight_smile:

  • Daan


Thanks for your extensive answers. I read something called the “Dynamo Language Manual”, which I found on It provides good information about Code
Blocks and Design Script examples that support common Code Blocks. I need to learn more about Variables, because which variables certain nodes in my graph need on their inputs are what I don’t fully understand. You’re correct that I also need to better understand
lists and list controls.

I would share my Revit file with you, but at this point all it has is four levels. My intention is to use this graph very early in a project. Please see the attached
Excel file, which is the file my graph is referencing. The last column in the spreadsheet, titled “Title on Sheet” is a View Parameter. Eventually, I want to build a graph that creates Views and Sheets. For now, I wanted the graph I sent earlier to create
a View, assign it a name, assign a View Template, and assign a Title on Sheet. All the necessary data comes from the transposed list from the spreadsheet. My graph now performs three out of these four steps. I’ll be very interested to hear any suggestions
you have after reviewing the spreadsheet.

Thanks for all your time and energy,



Project View List.xlsx (8.05 KB)

1 Like