Hi everyone,
I’m not sure what happened to my Dynamo, or Revit but I am getting a very strange python error when I try to add reference to ProtoGeometry.dll. It exists in C:\Program Files\Dynamo\Dynamo Core\2 and 1.3. I’ve tried in both Dynamo 1.3.2 and 2.01 and received the same error. I’ve also tried using clr.AddReferenceToFile(‘ProtoGeometry.dll’) and received a similar error.
I recently installed RevitPythonShell, I’m not sure if that could’ve messed something up.
Here is the code :
import clr
clr.AddReference('ProtoGeometry')
clr.AddReference('DSCoreNodes')
import DSCore
from DSCore import *
from Autodesk.DesignScript.Geometry import *
Here is the error:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 2, in
IOError: System.IO.IOException: Could not add reference to assembly ProtoGeometry
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.DynamicInstruction
4.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)
Any thoughts?