View Full Version : Add in VB.net Pick Point
LWILSON429
2016-01-04, 03:09 PM
I'm writing a Addin in vb.net and can't find a good example of a user picking a point.
Any help would be appreciated.
BlackBox
2016-01-04, 04:31 PM
Consider the GetPoint() Method (https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-NET/files/GUID-33058D80-EA6B-4A19-9F07-F20BC5EBC530-htm.html). :beer:
While perhaps insufficient for advanced developers, Autodesk's Help, SDK Documentation, Knowledge Base, and DevBlog tend to have enough examples to cull what you might need early on.
Cheers
LWILSON429
2016-01-04, 04:57 PM
Forgot to say it's a Revit program. I found the Selection.PickPoint Method in the API help file, but seemed to be doing something wrong.
Here is my code
Imports Autodesk.Revit
Imports Autodesk.Revit.DB
Imports Autodesk.Revit.DB.Point
Imports Autodesk.Revit.UI
Imports Autodesk.Revit.ApplicationServices
Imports Autodesk.Revit.UI.Selection.ObjectType
Imports System.Reflection
Module mPickDim
Public Sub LocationPoints(uidoc As UIDocument)
Selection.
'Dim uidoc As UIDocument
' Dim L1 As XYZ
' Dim L2 As XYZ
' Dim L3 As XYZ
'Dim L4 As XYZ
'Dim R1 As XYZ
'Dim R2 As XYZ
'Dim R3 As XYZ
'Dim R4 As XYZ
'Dim VD As XYZ
'Dim point1 As XYZ
'Dim point2 As XYZ
'Dim PickPT As Integer
'Dim WTkips As String
Dim snapTypes As ObjectSnapTypes = ObjectSnapTypes.Endpoints
Dim LB As XYZ = uidoc.Selection.PickPoint(snapTypes, "Select an Lower Left point")
Dim RB As XYZ = uidoc.Selection.PickPoint(snapTypes, "Select an Lower Right point")
Dim RT As XYZ = uidoc.Selection.PickPoint(snapTypes, "Select an Top Right point")
End Sub
End Module
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.