Picking a Point

I am regularly asked by developers how to pick a point in Revit. This is currently not possible. The wish has been registered, but there are no plans to provide this functionality in the short term. The only interactive selection methods available in the API are the PickOne() and WindowSelect() methods on the Selection class in the Autodesk.Revit namespace, which prompt the user to select one or several building elements.

If you need the user to specify a point somewhere in the model, you can look at some of the SDK samples for an idea how the lack of a point selection mechanism on the Revit graphics screen can be circumvented.

For instance, the CurtainWallGrid sample displays a form with two tabs in it. The first tab is designed for the user to create a new curtain wall. To do so, she needs to specify the wall start and end points for the wall baseline. This is done graphically on a canvas representing the XY plane in the model.

Once the curtain wall has been created, the next tab can be used to graphically define the grid lines on it. This time, a canvas displaying the wall face is shown, and the user can interactively add, delete and move grid lines around.

Several other SDK samples also display their own little graphics windows allowing user interaction to specify points in space or on selected objects. They include NewOpenings, NewPathReinforcement, and ShaftHolePuncher, to name a few.

I hope this provides some ideas and a starting point for you in case you happen to run into this requirement.

By the way, if you make use of the PickOne() and WindowSelect() methods, note that you can also use the StatusbarTip property to define the message displayed in the Revit status bar to prompt the user what selection to make. If you need to display more information, you can also show a temporary modeless little form of your own while prompting for the selection.


Comments

4 responses to “Picking a Point”

  1. Jeremy,
    I have been searching high and low for how we could do this. Is this functionality at all on the developmental horizon for the Revit API or will us 3rd party developers have to jump through hoops to accomplish this? Is there a way to invoke something that may be exported from Revit.exe Picker.dll or Graphics.dll to accomplish this until getpoint is actually implemented to the API? I have been using the Autodesk APIs for about 18 years now starting with lisp on R10, ads, arx and com, getpoint has always been available no matter what API I was using.

  2. Dear Jim,
    Thank you for your query, which I completely understand and support. I brought your comment as well as another one in a similar vein by Greg McLaughlin to the development team’s attention, so they are highly aware of this issue and its importance to developers.
    Cheers, Jeremy.

  3. Jason Gardner Avatar
    Jason Gardner

    Jeremy,
    I agree with Jim’s concerns and would like to add that not having the the ability to let the user pick a point in the API is one of the roadblocks to closing the technician efficiency gap between Revit and AutoCAD. It should be much more of a priority.

  4. Dear Jason,
    Thank you for reinforcing the message. The development team are aware of the importance of this issue now.
    Please also be aware that trying to draw parallels between AutoCAD and Revit can become a hindrance to your thinking and development work. The paradigm is utterly different. It is extremely imporant to know and understand the Revit product, user interface and underlying philosophy well in order to create successful applications for it. You cannot build purely on AutoCAD experience, be it ever so extensive. And of course I fully agree that picking a point in the graphics screen is a fundamental useful feature, as proven by the Revit SDK samples mentioned above.
    Cheers, Jeremy.

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading