Good day!
I want to set a viewTemplate to multiple views. I have already tried this implementation (Python - Set different ViewTemplate to multiple FloorPlanView ) but I get a mistake after compilation:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Tracking (last call last):
File “”, line 34, in
EnvironmentError: System.Runtime.InteropServices.SEHException (0x80004005): An external component threw an exception.
at Element.setParameterValue (Element *, ElementId, ParameterValue *)
at Autodesk.Revit.DB.Parameter.Set (ElementId value)
at Microsoft.Scripting.Interpreter.FuncCallInstruction 3.Run (InterpretedFrame) at Microsoft.Scripting.Interpreter.Interpreter.Run (InterpretedFrame) 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)
at Microsoft.Scripting.Interpreter.Interpreter.Run (InterpretedFrame)
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)
I attach my code. How I can solve it? Will be glad for any help.
paris
July 12, 2021, 6:00pm
2
Hi @cool.inna-24 , you can use OOTB node instead python node, or it’s a choice?
Cheers
@paris , thank you for your answer.
I tried with nodes, but I was needed to loop a combination of nodes for each viewTemplate. I haven’t been successful in nodes. Next I decided to use python script. It is even more optimal.
So I do want to eliminate the mistake.
Hi @cool.inna-24 , can you share your .Dyn file ? There’s an error with your Views.ViewTemplate node and that might be the reason why it won’t set the viewtemplate.
Also, do you want to apply one viewtemplate to all the views selected or multiple viewtemplate like my Script ?
1 Like
paris
July 13, 2021, 7:09am
5
Hi @cool.inna-24
Maybe this can help you:
Hello Dynamo Community!
This is my first post but it for sure won´t be the last one! I´m pretty new to Dynamo and Revit and i`m having fun experimenting and lerning. I´m having trouble with my first script and would appreciate your help.
Task:
find all views with specific view template
set new view template (e.g.: wall_views_filter)
set another view template (e.g.: wall_views)
Reason:
Our worklflow is to have a filter-template for our view types. For example, we have a wall_views template …
Hey.
I’m trying to make levels and then put on some specific view templates, but i get a warning when i try to put on view templates.
How can change the list content to a string??
[Udklip]
Nichlas
Cheers
1 Like
Thank you, @BenBimlogic , @paris !
@BenBimlogic , you hit it! I have solved a problem at last.
In attached image there are changes those I made.
1 Like
No problem! I’m Glad that I could help!
1 Like