Sheet List Under the Hood

Hi all,

Continuing the discussion from The elusive Schedule Key ? Where does it live?:

I was wondering if anyone had a good link for reading about the under the hood workings of a sheet list. I’ve been trying to make a python for creating sheet lists and got stuck trying to add categories.



You would use the CreateSheetList method.

Do you mean adding Available Fields to the schedule? You should upload an image of your graph and include the Python script you started, with the warnings you received.

Hi Amy,

So the immediate question is how to access a Property, rather than a Method… It’s hard to google as people chuck these words around inaccurately…

I’m sure you can easily answer my dumb question, but I’m trying to avoid needing to ask them… I’m aware of this link ttps:// and the Lynda tutorials, but I’m still hitting walls very frequently… Would you have any recommendations?

Here’s my graph, it seems like something Python could do very concisely where as the graph is huge.
I can create and name the schedule in Python, after that I have to go to nodes… Partly because I’m not understanding how Revit is thinking about the schedule at the fundamental level to allow me to think about the Python properly…

CreateSheetList.dyn (32.9 KB)

The python to create and name the sheet list works fine, so I then need to add fields and filter by name… The examples I’ve seen make use of the Methods available to a schedule to get information, however I need to get the properties from the Schedulable Fields, which is my current wall.

import clr

#Import Revit Nodes
import Revit

# Import RevitAPI
import Autodesk
from Autodesk.Revit.DB import *

# Import DocumentManager and TransactionManager
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

keyschedule = UnwrapElement(IN[0])
definition = keyschedule.Definition
idAll = definition.GetSchedulableFields()
ids = definition.GetFieldOrder()
idAllNames = []

for id in idAll:
param = idAll.FieldName()
# idAllNames.append(param.GetName())

#for idA in idAll:
# schType = definition.GetType()
# schAddField = definition.AddField(
# idAllNames.append(idAllParam.GetName())

OUT = param#idAllNames,# idAll, idAllParam

Any assistance gratefully received :slight_smile: