Open
Description
✈ Pre-Flight checks
- I don't have SentinelOne antivirus installed (see above for the solution)
- I have searched in the issues (open and closed) but couldn't find a similar issue
- I have searched in the pyRevit Forum for similar issues
- I already followed the installation troubleshooting guide thoroughly
- I am using the latest pyRevit Version
🐞 Describe the bug
When attempting to Copy / Paste States for viewport placement on sheet via Basepoint, I receive a traceback error which states viewports cannot be non-rectangular. However, I'm using a scope box to crop the view, and Revit does not allow those to be non-rectangular.
⌨ Error/Debug Message
ERROR [pyrevit.revit.db.transaction] Error in Transaction Context. Rolling back changes. | <type 'exceptions.Exception'>:The crop of the associated view is not permitted to have a non-rectangular shape.
ERROR [pyrevit.revit.db.transaction] Error in TransactionGroup Context. Rolling back changes. | <type 'exceptions.Exception'>:The crop of the associated view is not permitted to have a non-rectangular shape.
IronPython Traceback:
Traceback (most recent call last):
File "C:\Program Files\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Selection.panel\memo.stack\Paste State.pushbutton\script.py", line 38, in <module>
File "C:\Program Files\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Selection.panel\memo.stack\lib\copypastestate\actions.py", line 610, in paste
File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\revit\db\update.py", line 133, in set_crop_region
Exception: The crop of the associated view is not permitted to have a non-rectangular shape.
Script Executor Traceback:
Autodesk.Revit.Exceptions.InvalidOperationException: The crop of the associated view is not permitted to have a non-rectangular shape.
at Microsoft.Scripting.Runtime.LightExceptions.ThrowException(LightException lightEx)
at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object value)
at Microsoft.Scripting.Interpreter.FuncCallInstruction`2.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.HandleException(InterpretedFrame frame, Exception exception)
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)
♻️ To Reproduce
- Click on view with scope box applied as crop region
- Navigate to pyRevit tab
- Click Copy State
- Click Viewport Placement on Sheet
- Select Align to Base Point on Paste
- Receive error.
⏲️ Expected behavior
I expect to be able to copy and paste views on sheets which use scope boxes as view boundaries.
🖥️ Hardware and Software Setup (please complete the following information)
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.16.24121+2117" | Path: "C:\Program Files\pyRevit-Master"
==> Attachments
master | Product: "24.2.1" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "23.1.4" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "Autodesk Revit 2022" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
==> Installed Extensions
==> Default Extension Search Path
C:\Users\qlevine\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
==> Extension Sources - Default
https://github.com/pyrevitlabs/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
24.2.1 | Version: 24.2.10.64 | Build: 20240408_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"
23.1.4 | Version: 23.1.40.56 | Build: 20240411_0945(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"
Autodesk Revit 2022 | Version: 22.1.60.18 | Build: 20240417_1700(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"
==> Running Revit Instances
PID: 10160 | 24.2.1 | Version: 24.2.10.64 | Build: 20240408_1515(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2024"
==> User Environment
Microsoft Windows 10 [Version 10.0.19045]
Executing User: BERGMEYER\qlevine
Active User: BERGMEYER\qlevine
Admin Access: No
%APPDATA%: "C:\Users\qlevine\AppData\Roaming"
Latest Installed .Net Framework: 4.8
No .Net Target Packs are installed.
Installed .Net-Core Target Packs: v6.0.135 v6.0.427
pyRevit CLI v4.8.16.24121+2117.23a0b8cbc4babdeb29a0611e159d017bbe9cbad5
Additional context
No response