Unexpected Results from PickPoint

Hi there!

I’m working on a tool that relies on the revit.pick_point() functionality. I understand it calls the Autodesk.Revit.UI.Selection.Selection PickPoint method. I actually borrowed a bit of code from the Pattern/Hatch Maker script that’s a part of pyRevit, including the part about creating a sketchplane.

The points I get back from revit.pick_point seem correct for plan and ceiling plan views. :+1:

The points I get back from revit.pick_point in elevation or section seem to actually point to places that are very far away from where I clicked. :-1:

For example, I might expect something like X=6.25, Y=10, Z=25
but am getting X=55, Y=63, Z=10

My script has a version of the “make_pattern_line” def that is a part of the Make Pattern tool, it reshuffles the points XYZ values based on the view direction, but even then, the adjusted points are not correct for elevations/sections.

I also looked up the BuildingCoder to see if he had any suggestions. Something from that was Transforming the picked points based on the ProjectPosition, but that made the XYZ values even more off than before…

Any tips about how to better handle values from PickPoint when picking in elevation/section views? Have any of you successfully used PickPoint in a section/elevation view? :thinking: