Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Sheets Revit 2021 #887

Closed
DYoung-ORW opened this issue Apr 27, 2020 · 5 comments
Closed

Print Sheets Revit 2021 #887

DYoung-ORW opened this issue Apr 27, 2020 · 5 comments
Labels
API Change Revit API change that breaks pyRevit [class->Upgraded #{number}: {title}] Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class]

Comments

@DYoung-ORW
Copy link

DYoung-ORW commented Apr 27, 2020

Print Sheets does not see any sheets in the current project or linked models in Revit 2021. Revit 2019 works perfectly.

pyRevit 4.7.6
Revit 21.0.0.383

==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.7.6" | Path: "C:\Users\dyoung\AppData\Roaming\pyRevit-Master"
==> Attachments
master | Product: "2021 First Customer Ship" | Engine: 277 | Path: "C:\Users\dyoung\AppData\Roaming\pyRevit-Master" | Manifest: "C:\Users\dyoung\AppData\Roaming\Autodesk\Revit\Addins\2021\pyRevit.addin"
master | Product: "2019.2.2 Hotfix" | Engine: 277 | Path: "C:\Users\dyoung\AppData\Roaming\pyRevit-Master" | Manifest: "C:\Users\dyoung\AppData\Roaming\Autodesk\Revit\Addins\2019\pyRevit.addin"
master | Product: "2017.2.4" | Engine: 277 | Path: "C:\Users\dyoung\AppData\Roaming\pyRevit-Master" | Manifest: "C:\Users\dyoung\AppData\Roaming\Autodesk\Revit\Addins\2017\pyRevit.addin"
==> Installed Extensions
==> Default Extension Search Path
C:\Users\dyoung\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
2021 First Customer Ship | Version: 21.0.0.383 | Build: 20200220_1100(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021"
2019.2.2 Hotfix | Version: 19.2.20.24 | Build: 20190808_0900(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2019"
2017.2.4 | Version: 17.0.1158.0 | Build: 20181011_1645(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2017"
==> Running Revit Instances
PID: 18952 | 2021 First Customer Ship | Version: 21.0.0.383 | Build: 20200220_1100(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2021"
PID: 2752 | 2019.2.2 Hotfix | Version: 19.2.20.24 | Build: 20190808_0900(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2019"
==> User Environment
Microsoft Windows 10 [Version 10.0.18363]
Executing User: ORW\dyoung
Active User:
Admin Access: No
%APPDATA%: "C:\Users\dyoung\AppData\Roaming"
Latest Installed .Net Framework: 4.8
No .Net Target Packs are installed.
No .Ne-Core Target Packs are installed.
pyRevit CLI 0.25.0.0

pyRevit

eirannejad added a commit that referenced this issue May 1, 2020
@eirannejad
Copy link
Collaborator

Okay seems like Revit 2021 schedule export encoding has changed from UTF-16 to UTF-8. Fixed this for the next release. You can replace extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Print Sheets.pushbutton/script.py with the file below for now to make it work under 2021

script.py.zip

@eirannejad eirannejad added Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] API Change Revit API change that breaks pyRevit [class->Upgraded #{number}: {title}] labels May 1, 2020
@DYoung-ORW
Copy link
Author

That did the trick. Thank you for your help and this amazing tool!

@eirannejad eirannejad mentioned this issue Jun 9, 2020
@sharkmullet
Copy link

for anyone looking for the location, it was here for me:
C:\Users\myname\AppData\Roaming\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Print Sheets.pushbutton

@thazell
Copy link

thazell commented Jul 2, 2021

Just ran into this issue and for depending on the version of pyrevit you installed you might need to also update this file.
"pyrevitlib\pyrevit\coreutils\init.py"
update_files.zip

@gbalaka
Copy link

gbalaka commented May 19, 2023

**Is there a similar fix for Revit 2022.1. I'm having the same issue.

I tried replacing the script.py file, but i get an error message when i click on "Print Sheets"**

IronPython Traceback:
Traceback (most recent call last):
File "C:\Users\galaka\AppData\Roaming\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Print Sheets.pushbutton\script.py", line 1181, in
File "C:\Users\galaka\AppData\Roaming\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Print Sheets.pushbutton\script.py", line 432, in init
File "C:\Users\galaka\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\forms_init_.py", line 152, in init
File "C:\Users\galaka\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\forms_init_.py", line 165, in load_xaml
Exception: Set property 'Microsoft.Scripting.Runtime.DynamicXamlReader+DynamicWriter.SelectionChanged' threw an exception.

Script Executor Traceback:
System.Xaml.XamlObjectWriterException: Set property 'Microsoft.Scripting.Runtime.DynamicXamlReader+DynamicWriter.SelectionChanged' threw an exception. ---> System.MissingMemberException: 'Window_29$30' object has no attribute 'printers_changed'
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at CallSite.Target(Closure , CallSite , Object )
at Microsoft.Scripting.Runtime.DynamicXamlReader.DynamicWriter.DynamicEventInvoker.SetValue(Object instance, Object value)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
--- End of inner exception stack trace ---
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.WriteEndMember()
at Microsoft.Scripting.Runtime.DynamicXamlReader.LoadComponent(Object scope, DynamicOperations operations, XamlXmlReader reader)
at Microsoft.Scripting.Runtime.DynamicXamlReader.LoadComponent(Object scope, DynamicOperations operations, String filename, XamlSchemaContext schemaContext)
at Microsoft.Scripting.Interpreter.FuncCallInstruction4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.Ast.CallExpression.Invoke2Instruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run6[T0,T1,T2,T3,T4,T5,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) at Microsoft.Scripting.Interpreter.FuncCallInstruction8.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run8[T0,T1,T2,T3,T4,T5,T6,T7,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
at Microsoft.Scripting.Interpreter.DynamicInstruction8.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run7[T0,T1,T2,T3,T4,T5,T6,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) at Microsoft.Scripting.Interpreter.DynamicInstruction7.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run6[T0,T1,T2,T3,T4,T5,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
at IronPython.Runtime.FunctionCaller2.Default3Call2(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.DynamicInstruction5.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at IronPython.Runtime.Types.LateBoundInitBinder.FastInitSite1.CallTarget(CallSite site, CodeContext context, Object inst, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at IronPython.Runtime.Types.PythonType.FastTypeSite1.CallTarget(CallSite site, CodeContext context, Object type, T0 arg0)
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 PyRevitLabs.PyRevit.Runtime.IronPythonEngine.Execute(ScriptRuntime& runtime)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Change Revit API change that breaks pyRevit [class->Upgraded #{number}: {title}] Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class]
Projects
None yet
Development

No branches or pull requests

5 participants