"Copy Sheets to Open Documents" now preserves detail number#2704
"Copy Sheets to Open Documents" now preserves detail number#2704jmcouffin merged 2 commits intopyrevitlabs:developfrom frank-e-loftus:patch-1
Conversation
|
Unable to perform a code review. You have run out of credits 😔 |
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that when sheets are copied to open documents, their viewport detail numbers are preserved rather than renumbered.
- Introduces
match_detail_numberto copy the original detail number parameter. - Calls
match_detail_numberduring the viewport copy process. - Logs errors if either source or target viewport is missing.
Comments suppressed due to low confidence (2)
extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py:341
- Ensure that
loggeris imported or defined in this module; otherwise this call will raise a NameError at runtime.
logger.error(error_msg)
extensions/pyRevitTools.extension/pyRevit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py:345
- The detail number parameter is typically an integer; use
AsInteger()instead ofAsString()to retrieve and set the numeric value correctly.
.Set(original_vport.get_Parameter(dtl_num_param).AsString())
...vit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py
Outdated
Show resolved
Hide resolved
...vit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py
Outdated
Show resolved
Hide resolved
...vit.tab/Drawing Set.panel/Sheets.pulldown/Copy Sheets to Open Documents.pushbutton/script.py
Outdated
Show resolved
Hide resolved
Thanks @frank-e-loftus, keep them coming! |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+0700-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1347-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1420-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1830-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25171+0757-wip |
|
📦 New work-in-progress (wip) builds are available for 5.2.0.25181+1313-wip |
|
📦 New public release are available for 5.2.0.25181+1425 |
"Copy Sheets to Open Documents" now preserves detail number
When using this command, the Detail Number parameter would previously be renumbered based on order placed. This PR numbers the duplicated viewports according to the original numbering.