Multi-Category Schedule

Hello guys,

Can somebody guide me how to create Multi-Category Regular Schedules? This is where I’ve reached so far

Whats the Category type i need to input to create an Multi-Category Schedule?

I don’t believe that is a valid category for you make a schedule with. Basically if it isn’t in the list inside of Revit, then you will not be able to make Dynamo do it either.

Okay! So in Dynamo how do you get to choose a generalized multiple category option as you get to choose in Revit shown as below?

image

There are plenty of threads that cover this topic. Please try searching before posting.

I don’t believe there are any core nodes that do this but it is possible with Python.

Thankyou @Nick_Boyts for your quick reply. Yes, i researched a lot before i posted and also came across your post from earlier but i am not at all familiar with coding and to be honest didn’t even know how to implement your code. Hence, preferred to ask the community and give it a try :slight_smile:. However, if this interests you, i found a way around it and use core nodes to create a Multi-category schedule [Screenshot attached]. Found out that “Assembly View” node from steam labs helps create a multicategory sch which i altered to fit in with my needs. Given the condition you’re working with assemblies i guess!

Thankyou for your time and support @Nick_Boyts and @SeanP !. I appreciate it

1 Like

Hey @Nick_Boyts, if its not much to ask can you provide quick steps on how to use your python code to create a Multi-category schedule?

I’d really appreciate it!

id = ElementId.InvalidElementId
newSchedule = ViewSchedule.CreateSchedule(doc,id)

There are some good threads with topics on how to start learning Python. (I’d start here.) But that code is basically it. Using the Revit API you can create schedules with the id of the category you want. For multi-category schedules you use the InvalidElementId. After you’ve created the schedule you can name it and set other properties.

1 Like
import clr
import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import System
from System import Array
from System.Collections.Generic import *
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager 
from RevitServices.Transactions import TransactionManager 

clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")

import Autodesk 
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication 
app = uiapp.Application 
uidoc = uiapp.ActiveUIDocument

schedule = []
names = IN[0]

id = ElementId.InvalidElementId


TransactionManager.Instance.EnsureInTransaction(doc)

for i in names:
	
	newSchedule = ViewSchedule.CreateSchedule(doc,id)
	newSchedule.ViewName = i
	schedule.append(newSchedule)

TransactionManager.Instance.TransactionTaskDone()


OUT = schedule

Hi Thiru

Thank you for posting this Python code for creating a multi-category schedule. I was wondering if you might be able to help to adjust the code for multi-category MaterialTakeoff schedule?
I could not get the code fully to work. It did create a schedule but maybe my inputs were incorrect.
I cannot use Python to be able to attempt to adjust your code. Would be amazing if this is possible to adjust the code for multi-category MaterialTakeoff?

Thank you very much.
Best
Tim

1 Like

@TimGreatrex use below methods for different schedule and change 40th line only is enough

import clr
import sys
sys.path.append(‘C:\Program Files (x86)\IronPython 2.7\Lib’)
import System
from System import Array
from System.Collections.Generic import *
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")

import Autodesk 
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication 
app = uiapp.Application 
uidoc = uiapp.ActiveUIDocument

schedule = []
names = IN[0]

id = ElementId.InvalidElementId


TransactionManager.Instance.EnsureInTransaction(doc)

for i in names:
	
	newSchedule = ViewSchedule.CreateMaterialTakeoff(doc,id)
	
	newSchedule.ViewName = i
	schedule.append(newSchedule)

TransactionManager.Instance.TransactionTaskDone()


OUT = schedule
1 Like

Thank you very much! I will give this a test soon.

Much appreciated.

Hello, I took the liberty to use this code for a script I am working on, hope there is no problem with that.
I only could not define the name of the schedule, Dynamo tells me “ViewSchedule” object has no attribute “ViewName”
Could it be a problem with the input I am giving or is it the Dynamo version
Hope you can reply and thank you!

hi, I changed your code a bit and tried to run it with a name, but it creates a schedule for every character. I tried inputing a string but it gave the same result. Any ideas of why this is happening?

import clr
import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import System
from System import Array
from System.Collections.Generic import *
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager 
from RevitServices.Transactions import TransactionManager 

clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")

import Autodesk 
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication 
app = uiapp.Application 
uidoc = uiapp.ActiveUIDocument

schedule = []
names = IN[0]
newSchedule = []

id = ElementId.InvalidElementId


TransactionManager.Instance.EnsureInTransaction(doc)

for i in names:
	
	newSchedule = ViewSchedule.CreateSchedule(doc,id)
	newSchedule.Name = i
	schedule.append(newSchedule)

TransactionManager.Instance.TransactionTaskDone()


OUT = schedule

2 Likes

Hi,I succeeded using your method,enter the list type.