Skip to content

Update pick_point() in pyrevitlib\pyrevit\revit\selection.py#3018

Merged
jmcouffin merged 7 commits intopyrevitlabs:developfrom
Denver-22:develop
Jan 17, 2026
Merged

Update pick_point() in pyrevitlib\pyrevit\revit\selection.py#3018
jmcouffin merged 7 commits intopyrevitlabs:developfrom
Denver-22:develop

Conversation

@Denver-22
Copy link
Copy Markdown
Contributor

Implemented the creation of a work plane for the current view. Without this, the PickPoint() function does not work.
This is relevant for ceiling plans, where a work plane is sometimes not assigned during creation.

P.S. The translation for French, German, and Spanish was done using a translator. I apologize for any errors.

Implemented the creation of a work plane for the current view. Without this, the PickPoint() function does not work.
This is relevant for ceiling plans, where a work plane is sometimes not assigned during creation.
@devloai
Copy link
Copy Markdown
Contributor

devloai bot commented Jan 15, 2026

Unable to trigger custom agent "Code Reviewer"You have run out of credits 😔
Please upgrade your plan or buy additional credits from the subscription page.

c
Some fix.
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 adds automatic work plane (SketchPlane) creation to the pick_point() function in pyrevitlib's selection utilities. The change addresses an issue where PickPoint() fails in views without an assigned work plane, particularly ceiling plans.

Changes:

  • Adds logic to detect when a view lacks a SketchPlane and automatically creates one based on the view's direction and origin
  • Implements multi-language support for the transaction name using translations for English, French, German, Spanish, and Russian
  • Wraps the SketchPlane creation in a transaction to ensure proper database modification

@jmcouffin
Copy link
Copy Markdown
Contributor

Please let me know when it is ready for review @Denver-22

@Denver-22
Copy link
Copy Markdown
Contributor Author

@jmcouffin, it is ready

@jmcouffin jmcouffin added the Enhancement Enhancement request [class->Improved #{number}: {title}] label Jan 15, 2026
… creation and cleanup

- Enhanced error handling during SketchPlane creation and deletion.
- Added support for Chinese_Simplified translation.
- Ensured temporary work planes are removed after use to maintain document integrity.
@jmcouffin
Copy link
Copy Markdown
Contributor

Not that simple in the end..
I did not want the selection to create a transaction commit it without roolback... imagine all these new sketchplanes piling up in all revit files ;p

thks @Denver-22

@jmcouffin jmcouffin merged commit 4031171 into pyrevitlabs:develop Jan 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26017+1003-wip

@Denver-22
Copy link
Copy Markdown
Contributor Author

@jmcouffin
I understand your idea about eliminating the transaction for creating workplanes. This is the correct solution compared to mine!
But when testing your solution, two transactions are created (there should be zero). Are you getting different results?
I've created a new PR with a solution that implements your idea. Please review it.

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26017+2108-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26017+2119-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26022+2117-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26022+2124-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26022+2138-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26023+2136-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26023+2141-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26025+1329-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26025+1418-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2037-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2039-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2101-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2136-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2147-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.3.1.26030+2212-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1043-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1111-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1304-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1323-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1433-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1538-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1543-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1553-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1612-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1624-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1738-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1743-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1829-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 5.3.1.26032+1937-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 6.0.0.26032+1956-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 6.0.0.26032+2005-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New work-in-progress (wip) builds are available for 6.0.0.26032+2008-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New public release are available for 6.0.0.26032+2040

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

📦 New public release are available for 6.0.0.26032+2040

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}]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants