ENTSEL (TRY #2)

Discussion in 'AutoCAD' started by kemp, Dec 19, 2003.

  1. kemp

    kemp Guest

    Okay, I'll try this again, for some reason it didn't post the first try...

    Is there a way to make entsel grab an entity based on the closest point to a
    predefined point nearby? In other words - If I pick a point, can I use
    entsel to pick up lines nearby for fillet or trim?

    When I use (entget (line1)) & (entget line2)) on the lines it doesnt retain
    a selection point like entsel does. Can I use CONS to add a point to an
    entity defined by entget? Of course I would still need to find out how to
    get the closest point....Sorry, thinking out loud.

    Hope someone knows! Obviously I'm still learning...

    Thanks, kemp
     
    kemp, Dec 19, 2003
    #1
  2. kemp

    kemp Guest

    It is possible I'm making this harder than is necessary :)

    I want to be able to manipulate these two lines without actually selecting
    them. These lines are offsets from two other pre existing lines. The script
    works this way: I select two lines, and the side to offset. From here I am
    trying to make it fillet and trim these new lines without having the user
    enter any more information. entsel works but I'm not aware of a way to use
    it on lines that aren't selected by the user.

    Hope that clears a bit of the fog...

    Thanks, kemp
     
    kemp, Dec 19, 2003
    #2
  3. kemp

    R.K. McSwain Guest

    Like this?

    (nentselp "Pick a point" (osnap (getpoint) "_nea"))
     
    R.K. McSwain, Dec 19, 2003
    #3
  4. kemp

    C Witt Guest

    would not using the "last" option select the new lines?
     
    C Witt, Dec 19, 2003
    #4
  5. kemp

    kemp Guest

    I believe nentselp is probably what I'm looking for. Using entlast doesn't
    seem to retain a selection point. I am not sure how to use "last" in this
    situation as C Witt suggests.

    From here what I need is a way to define the selection point that is on the
    line based on another point nearby. Is there a function like
    vlax-curve-getClosestPointTo for lines?

    Thanks for the help from you all so far!

    kemp


    Like this?

    (nentselp "Pick a point" (osnap (getpoint) "_nea"))
     
    kemp, Dec 19, 2003
    #5
  6. The vlax-Curve functions work on lines. They are derived from the curve
    class.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | I believe nentselp is probably what I'm looking for. Using entlast doesn't
    | seem to retain a selection point. I am not sure how to use "last" in this
    | situation as C Witt suggests.
    |
    | From here what I need is a way to define the selection point that is on
    the
    | line based on another point nearby. Is there a function like
    | vlax-curve-getClosestPointTo for lines?
    |
    | Thanks for the help from you all so far!
    |
    | kemp
    |
    |
    | | | > Okay, I'll try this again, for some reason it didn't post the first
    try...
    | >
    | > Is there a way to make entsel grab an entity based on the closest point
    to
    | a
    | > predefined point nearby?
    |
    | Like this?
    |
    | (nentselp "Pick a point" (osnap (getpoint) "_nea"))
    |
    |
     
    R. Robert Bell, Dec 20, 2003
    #6
  7. kemp

    kemp Guest

    I didn't even think to try that!

    Thanks everyone, I will try this stuff monday when I return to work.
    Hopefully I will grow up to be a real lisp programmer soon :)

    kemp
     
    kemp, Dec 20, 2003
    #7
  8. kemp

    Jeff Mishler Guest

    OK, something like this:

    (setq lastent (entlast))
    (command "offset")
    (while (= (logand (getvar "CMDACTIVE") 1) 1)
    (command pause)
    )
    (setq line1 (entnext lastent)
    line2 (entnext line1)
    )
    (command "fillet" line1 line2)

    HTH,
    Jeff
     
    Jeff Mishler, Dec 20, 2003
    #8
  9. kemp

    John Uhden Guest

    I like your attitude!
     
    John Uhden, Dec 20, 2003
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.