+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Senior Member
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Bulgaria, Sofia
    Posts
    228

    Default VBA - Getting an entity at a osnap point

    Registered forum members do not see this ad.

    I'm trying in VBA to allow the user to select a line at a specific point. Something like getPoint (with the osnap visible) but in fact getting both - the coordinates of the point of selection and the selected object. It should be almost like using the GetEntity, but there I can't control visibly the point of selection.

    Any ideas?

  2. #2
    Full Member
    Computer Details
    AstroNout's Computer Details
    Operating System:
    Windows 7 Premium
    Computer:
    ASUS Notebook K72Jr Series
    Motherboard:
    ASUS K72Jr
    CPU:
    P6100 @ 2.00 GHz 2.00 GHz
    RAM:
    8GB
    Graphics:
    Mobility Radeon HD 5470
    Primary Storage:
    500 GB
    Using
    Map 3D 2011
    Join Date
    Jul 2011
    Location
    Oostkamp, Belgium
    Posts
    54

    Default

    I think you'll first have to select the line, and then select the point. That's the easy way out :-)

  3. #3
    Senior Member
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Bulgaria, Sofia
    Posts
    228

    Default

    I know I can do it this way, but I'd still like to perform the operation with one selection only...

  4. #4
    Full Member
    Computer Details
    AstroNout's Computer Details
    Operating System:
    Windows 7 Premium
    Computer:
    ASUS Notebook K72Jr Series
    Motherboard:
    ASUS K72Jr
    CPU:
    P6100 @ 2.00 GHz 2.00 GHz
    RAM:
    8GB
    Graphics:
    Mobility Radeon HD 5470
    Primary Storage:
    500 GB
    Using
    Map 3D 2011
    Join Date
    Jul 2011
    Location
    Oostkamp, Belgium
    Posts
    54

    Default

    Well, then I haven't got a better idea Sorry!

  5. #5
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,791

    Default

    entsel gives entity and pick point but!! pick point is not necessarily on actual object but can be real close. in lsp VBA ?
    A man who never made mistakes never made anything

  6. #6
    Senior Member
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Bulgaria, Sofia
    Posts
    228

    Default

    It's VBA. I kind of managed to pick an object at osnap point using GetPoint, where osnap works, and then iterate trough all the objects to find which of them can be picked at this point. I'd like there was a better solution but it turs out that this works quite fast even in case of several thousands of objects

  7. #7
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,791

    Default

    Registered forum members do not see this ad.

    Another way if you can pick the object using snaps then retrieve the variable lastpoint then select object at this point ?
    A man who never made mistakes never made anything

Similar Threads

  1. Replies: 10
    Last Post: 9th Jun 2011, 04:57 pm
  2. Finding a point in an Entity problem
    By Rob-GB in forum AutoLISP, Visual LISP & DCL
    Replies: 10
    Last Post: 1st Mar 2011, 06:00 pm
  3. Making a line command loop from point to point
    By harrison-matt in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 2nd Oct 2010, 01:41 pm
  4. Inventor Drawing dimensions point to point, aligned, curve
    By linnmaster in forum Autodesk Inventor
    Replies: 10
    Last Post: 8th Feb 2010, 07:29 am
  5. Replies: 9
    Last Post: 16th Oct 2009, 02:01 am

Bookmarks

Posting Permissions

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