Dynamo and IronPython - incompatibilities with other applications

@Michael_Kirschner2 Michael, thanks for the input.

I tried repairing and even uninstalling and reinstalling IronPython 2.7.3. None of this solved the error. Also, like I said the script works fine in Dynamo 1.3.2 fine prior to installing 2.0.0 on the same computer. Here is the script for download if you would like. Sheet Creation from Excel v1.0.dyn (45.1 KB)

The error vary slightly depending on the python script, but they are all tracing back to clr functions. Below is one example, I can post another if that would help.

The tests were run on Revit 2018.3 and window 10. I can test on Revit 2017 and 2016 if that would help.<a

Error:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 6, in
IOError: System.IO.IOException: Could not add reference to assembly RevitServices
at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name)
at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object references)
at Microsoft.Scripting.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
at DSIronPython.IronPythonEvaluator.EvaluateIronPythonScript(String code, IList bindingNames, IList bindingValues)

Here is the code for that node: (line 6 is “clr.AddReference(“RevitServices”)”)

import System
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager

cats = IN[0]
doc = DocumentManager.Instance.CurrentDBDocument
elementlist = list()

for item in cats:
	collector = FilteredElementCollector(doc)
	collector.OfClass(FamilySymbol)
	bic = System.Enum.ToObject(BuiltInCategory, item.Id)
	collector.OfCategory(bic)
	elementlist.append(collector.ToElements())
OUT = elementlist