- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Having the user pick a 2D point in a view with selection.PickPoint("Please Pick a Point.") requires the view to have its active workplane set. If the user hasn't ever selected an active workplane for the current view, PickPoint causes an exception. Up until now, I've always just displayed an error dialog box that basically says "Set the views workplane to any valid plane, and try again. "
I would like to make this a little more sophisticated by having my add-in set the workplane if necessary. And I found this example:
https://forums.autodesk.com/t5/revit-api-forum/set-active-work-plane/td-p/3818199
But before I go setting the workplane, I'd like to check and make sure it hasn't already been set. (I don't want to change a workplane the user has set.) I guess I could just check for an exception when asking for a PickPoint, but I assume there could be other reasons why an exception would occur (escape for example, or clicking outside the revit window maybe?)
I'm not seeing anything obvious in the API commands, and a google search has come up empty....So, is there any way to check and see if a view has its active workplane set?
Solved! Go to Solution.