Hi, I’m trying to make a Column and Wall Schedule in a Drafting View. On paper it seems really easy but I keep running into Looping/Iterating issues. I need to get the maximum of a group of values and then add it to the next list to get an x position on my Column and Wall Schedule. Some friends helped me with the Python so far but I’m no expert. I would prefer to do it in Dynamo only and stick to the ‘Visual Programming’.

Here’s my source code:

**Python Script (Loop through numbers to add an X Position)**

import clr

clr.AddReference(‘ProtoGeometry’)

from Autodesk.DesignScript.Geometry import *

#The inputs to this node will be stored as a list in the IN variables.

masterList = IN[0]

outputList =

for i in range(len(masterList)-1):

subList = masterList[i]

xPosition = [0]

for i in range(len(subList)-1):

firstNumber = subList[i]

secondNumber = xPosition[len(xPosition)-1]

xPosition.append(firstNumber+secondNumber)

outputList.append(xPosition)

#Assign your output to the OUT variable.

OUT = outputList

**Python Script (Find the max x position of each Mark)**

import clr

clr.AddReference(‘ProtoGeometry’)

from Autodesk.DesignScript.Geometry import *

#The inputs to this node will be stored as a list in the IN variables.

markList = IN[0]

xPosList = IN[1]

output =

for i in range(len(markList)-1):

subMarkList = markList[i]

for j in range(len(subMarkList)):

markValue = subMarkList[j]

xPos = xPosList[i][j]

output.append(markValue + " - " + str(xPos))

output = sorted(output)

#Assign your output to the OUT variable.

OUT = output

I have attached the dyn as well as a sample rvt with the families loaded. Thanks for looking at this!

WALL AND COLUMN SCHEDULE 1.dyn (90.1 KB) graph for this.

Thanks for your help. I will do my best to explain the result I’m looking for, it is a little strange probably. I’m planning on working on this on Monday-Tuesday of next week.

For now though, I’m trying to group the number of structure above the corresponding Base Cell Family. So anything that is a 1 (A,B,C etc) will be grouped under 1 and then anything 2 above 2. I’ll do better next week. Thanks again.

Thank you for your help on this so far.

I have attached images below to explain what I’m looking to do. The walls and columns are tagged with a number indicating which structural load they are on. For instance if a Column is sitting on a wall tagged as 2 then the Column will also be tagged 2. If there are 2 columns then they would be tagged 2A and 2B. There are no W or C prefixes.

The Wall and Column Schedule groups and lines up the structural load numbers. For instance, all of the 1, 1A and 1B loads should be grouped in 1. The only difference between columns and walls is that the cell in the for columns is 1500 wide and the one for walls is 3000 wide.

The Dynamo Graph above (that I originally posted) is only missing the organization of the cells in their proper structural load number column.

This is how the structural loads are numbered:

This is how I want the Wall and Column Schedule to appear:

This is what I have so far:

GRAPHICAL COLUMN AND WALL SCHEDULE_2017-06-05A.rvt (2.7 MB)

It appears that the Revit file I previously uploaded has the wrong structural load numbers. Attached is the updated file.

Hopefully my graph isn’t overly confusing. The beginning deals with the data manipulation I think you’re looking for and the rest is just constructing geometry for a visual proof of concept.

Output geometry showing a 3D version of your schedule.

Thank you very much for posting. I’ve been swamped and will try your graph soon. Looks really cool!

Hi Nick,

Thanks for developing and posting the Graph. From what I see you are automatically assigning a number based on vector. This will definitely be useful but as a next step. What I am looking for is to sort 2D Families in a Drafting View. As I described above, each Family needs to be grouped above it’s main structural number.

It should be the same workflow. You’re wanting to place families and change parameter information based on their individual widths and the width of the total load. I’m constructing those families (geometries) based on the same information but also moving them to the correct location - which is again based on their dimensions. Everything is based off the initial width information once the items are grouped by structural load, and it looks like they already are in your graph.

To get the total width of the load you just have to find the level with the largest load.

I think you (Nick) did what I need with a Python Script called ‘Get Global End Point for Group’. Would you be willing to post that Graph/Python code?

The main problem I am looking to solve can be described as:

How do I find the start point for placing the ‘next’ grouping of Cell Families based on the total count and width of the previous?

Step 1:

Count the maximum number of Structural Walls/Columns tagged as '1, 1A, 1B’

**Wall Cell Families are 3000 wide and columns 1500. Multiply Count of Wall Cell Families x Total Width to get the next start point, in the case of my image above it would be 6000**

Objects tagged as 1 would always start from 0 (bottom left corner of matrix)

Step 2:

Start objects tagged as ‘2, 2A, 2B’ from 6000

In my image above I have only one column on ‘2’. So that would add 1500 to the next start point, totaling 7500

Step 3:

Start objects tagged as ‘3, 3A, 3B’ from 7500

and so on…

Oh!!! So sorry! I forgot I had those python scripts in there. Yes, give me one second to grab them.

It’s just a simple piece of code to sum up the value before. The important part is to not only sort your data by load, but also by level, so that you can take into account multiple items on one level.

```
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
numList = IN[0]
prevSum = 0
listOut = []
for num in numList:
prevSum = num + prevSum
listOut.append(prevSum)
#Assign your output to the OUT variable.
OUT = listOut
```

Awesome thanks! There is another Python before this one called’ Local Starting Point’. Would you please post that one as well?

It’s the same thing with more list management:

```
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
groups = IN[0]
listOut = []
for group in groups:
grouplist = []
for level in group:
prevSum = 0
numlist = []
for num in level:
numlist.append(prevSum)
prevSum = num + prevSum
grouplist.append(numlist)
listOut.append(grouplist)
#Assign your output to the OUT variable.
OUT = listOut
```

Hi,

I’m still struggling with this Python code. Take a look at the error i’m getting. I’ll post the graph and project file.

test wall and column schedule 2017-06-22.dyn (58.2 KB)

GRAPHICAL COLUMN AND WALL SCHEDULE_2017-06-16.rvt (2.7 MB)

Your list structure doesn’t match mine. Elements that are on the same level need to be grouped together. It should look like this:

```
List
0 List (LoadNumber)
0 List (Level)
0 List (Element)
```

Nick, thanks! With your help I was able to make what I was looking for. Here’s my result…

GRAPHIC COLUMN AND WALL SCHEDULE GRAPH 2017-06-23.dyn (81.8 KB)

GRAPHIC COLUMN AND WALL SCHEDULE_2017-06-23.rvt (2.9 MB)

1 Like