pick 2 points consecutively
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
i am using Visual Studio 2010 and I want to pick 2 points consecutively using Selection.Pickpoint.
The problem occurs after picking the first point, an error is thrown saying "The user aborted the pick operation." If I put MsgBox in between picking the first and second point, there are no errors. Why is this so? Thanks!
Code:
pt1 = uiDocument2.Selection.PickPoint(Autodesk.Revit.UI.Selection.ObjectSnapTypes.None, "Pick leader end...")
pt2 = uiDocument2.Selection.PickPoint(Autodesk.Revit.UI.Selection.ObjectSnapTypes.None, "Pick leader elbow...")
If I do the next code, theres no error:
pt1 = uiDocument2.Selection.PickPoint(Autodesk.Revit.UI.Selection.ObjectSnapTypes.None, "Pick leader end...")
MsgBox("test")
pt2 = uiDocument2.Selection.PickPoint(Autodesk.Revit.UI.Selection.ObjectSnapTypes.None, "Pick leader elbow...")