obtaining enitydata with getpoint

Discussion in 'AutoCAD' started by Marcel Janmaat, Sep 12, 2004.

  1. Question,

    I have a routine in witch i give a point beside a line, but i also want to
    obtain the layer of this line. Unfortunately i cannot do something like
    (entsel thispoint)

    Has any body got an idea on how to get the layer of tis line using just the
    information of the getpoint result. I also use (osnap point "nearest") to
    get the exact point on the line.

    MJ
     
    Marcel Janmaat, Sep 12, 2004
    #1
  2. Marcel Janmaat

    Doug Broad Guest

    Use (ssget thispoint) to get a selection set with one entity.
     
    Doug Broad, Sep 12, 2004
    #2
  3. The (getpoint) returns just coordinates of a point, so its result by itself
    cannot contain information from which you can get a layer name.

    I can't quite tell from your description whether you want to save the point
    BESIDE the line for some separate purpose, rather than saving the nearest
    point ON the line. If you want both, you'd have to save that (getpoint)
    result, and also save the association list from the line using (entget (car
    (entsel))), applying "nearest" osnap to that point. (You could save that
    nearest point (cadr entsel) if you want it, or not if all you want is the
    association list.) Then you can get the layer name from the (entget) list.

    Can you describe in more detail why you can't use (entsel thispoint)?

    Kent Cooper, AIA


    ...
     
    Kent Cooper, AIA, Sep 12, 2004
    #3
  4. Marcel Janmaat

    Doug Broad Guest

    Kent,
    Entsel can take a prompt but not a point argument.
    You might be thinking about nentselp?

    Regards,
    Doug
     
    Doug Broad, Sep 12, 2004
    #4
  5. This, I needed. And so simple!
    Why didn't i think of this myself.

    M
     
    Marcel Janmaat, Sep 13, 2004
    #5
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.