Results 1 to 3 of 3

Thread: Add in VB.net Pick Point

  1. #1
    Member
    Join Date
    2015-12
    Location
    Miamisburg,Ohio
    Posts
    4
    Login to Give a bone
    0

    Default Add in VB.net Pick Point

    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.

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Add in VB.net Pick Point

    Consider the GetPoint() Method.

    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
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Member
    Join Date
    2015-12
    Location
    Miamisburg,Ohio
    Posts
    4
    Login to Give a bone
    0

    Default Re: Add in VB.net Pick Point

    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
    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
    Last edited by BlackBox; 2016-01-04 at 05:33 PM. Reason: Please use [CODE] Tags

Similar Threads

  1. Mid & End point pick precision
    By msavage186729 in forum Inventor - General
    Replies: 1
    Last Post: 2010-07-15, 05:38 PM
  2. pick point hatch
    By cadpro929 in forum AutoCAD General
    Replies: 1
    Last Post: 2010-01-08, 01:43 PM
  3. Pick a point
    By fabrice in forum Revit - API
    Replies: 6
    Last Post: 2007-06-28, 09:43 PM
  4. Link pick point jumps to another point
    By lapace in forum AutoLISP
    Replies: 5
    Last Post: 2006-01-19, 09:43 PM
  5. ^C^C and pick point question
    By Coolmo in forum VBA/COM Interop
    Replies: 2
    Last Post: 2005-02-02, 02:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •