Skip to content

"Copy Sheets to Open Documents" now preserves detail number#2704

Merged
jmcouffin merged 2 commits intopyrevitlabs:developfrom
frank-e-loftus:patch-1
Jun 13, 2025
Merged

"Copy Sheets to Open Documents" now preserves detail number#2704
jmcouffin merged 2 commits intopyrevitlabs:developfrom
frank-e-loftus:patch-1

Conversation

@frank-e-loftus
Copy link
Copy Markdown
Contributor

"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.

@devloai
Copy link
Copy Markdown
Contributor

devloai bot commented Jun 12, 2025

Unable to perform a code review. You have run out of credits 😔
You can buy additional credits from the subscription page.

@jmcouffin jmcouffin requested a review from Copilot June 12, 2025 19:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_number to copy the original detail number parameter.
  • Calls match_detail_number during 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 logger is 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 of AsString() to retrieve and set the numeric value correctly.
.Set(original_vport.get_Parameter(dtl_num_param).AsString())

@jmcouffin jmcouffin merged commit 3772c6e into pyrevitlabs:develop Jun 13, 2025
@jmcouffin jmcouffin added Enhancement Enhancement request [class->Improved #{number}: {title}] Tools Issues related to pyRevit commands [subsystem] labels Jun 13, 2025
@jmcouffin
Copy link
Copy Markdown
Contributor

"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.

Thanks @frank-e-loftus, keep them coming!

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.1.0.25164+0700-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1347-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1420-wip

@frank-e-loftus frank-e-loftus deleted the patch-1 branch June 13, 2025 16:32
@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1830-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.1.0.25171+0757-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.2.0.25181+1313-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New public release are available for 5.2.0.25181+1425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Enhancement request [class->Improved #{number}: {title}] Tools Issues related to pyRevit commands [subsystem]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants