Final Version, thanks to Kenny with the Python
# Copyright(c) 2015, Konrad K Sobon
# @arch_laboratory, http://archi-lab.net
# Thanks Kenny
import clr
# Import Element wrapper extension methods
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
import sys
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)
revisions = UnwrapElement(IN[0])
sheets = UnwrapElement(IN[1])
Output = []
for sheet, revision in zip(sheets, revisions):
revnum = []
for rev in revision:
r = Autodesk.Revit.DB.ViewSheet.GetRevisionNumberOnSheet(sheet, rev.Id)
revnum.append(r)
Output.append(revnum)
OUT = Output
Edit: Just a couple of other thoughts…
I’ve added a bit to the beginning of the graph to Clear all the Issue values. Otherwise if someone’s put something in where it should be blank, that would remain.
You’ll likely want a way of recording the sending out of drawings at the same issue. E.G. you send tender drawings to the client, then a week later you’re asked to send the same drawings at the same revision to a contractor. Perhaps you could use the ‘Issued to’ revision parameter to log those and Dynamo could read them somehow?