I get the following error when running the code below:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 47, in
IndexError: index out of range: 4
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
from Revit.Elements import *
import clr
clr.AddReference("DSCoreNodes")
from DSCore import *
#The inputs to this node will be stored as a list in the IN variables.
#Assign your output to the OUT variable.
OUT = []
numberOfRevitentries = IN[0]
numberOfExcelentries = IN[3]
RevitLst = IN[1]
ExcelLst = IN[2]
Excelcount = 0
Revitcount = 0
RevitArray = List.GetItemAtIndex(RevitLst,Revitcount)
RevitRevDescription = List.FirstItem(RevitArray)
RevitRevDate = List.GetItemAtIndex(RevitArray,1)
RevitIssuedStatus = List.GetItemAtIndex(RevitArray,2)
RevitRevSequence = List.GetItemAtIndex(RevitArray,3)
ExcelArray = List.GetItemAtIndex(ExcelLst,Excelcount)
ExcelRevDescription = List.FirstItem(ExcelArray)
ExcelRevDate = List.GetItemAtIndex(ExcelArray,1)
ExcelIssuedStatus = List.GetItemAtIndex(ExcelArray,2)
ExcelRevSequence = List.GetItemAtIndex(ExcelArray,3)
while(Revitcount < numberOfRevitentries and Excelcount < numberOfExcelentries):
if(RevitRevDescription == ExcelRevDescription and RevitRevSequence ==ExcelRevSequence):
Excelcount = Excelcount + 1
ExcelArray = List.GetItemAtIndex(ExcelLst,Excelcount)
else:
RevitArray = List.GetItemAtIndex(RevitLst,Revitcount)
Revitcount = Revitcount + 1
#count = count + 1
OUT = Revitcount