Floating point

Discussion in 'AutoCAD' started by Steve Rudd, Aug 5, 2003.

  1. Steve Rudd

    Steve Rudd Guest

    Hi Guys,
    Need some help with this one please.

    (setq pt1 (entsel "Select Object :"))(terpri)
    returns :- (<Entity name: 400b21a0> (10197.4 31317.6 0.0))

    How do I extract the floating point so its values can be (in whole or part)
    used later in the routine?

    Rgds,
    Steve
     
    Steve Rudd, Aug 5, 2003
    #1
  2. Steve Rudd

    Joe Burke Guest

    Steve,

    (setq pt1 (cadr (entsel))) returns the point picked. The second item in the
    list.

    Study those help files, dude.

    Joe Burke
     
    Joe Burke, Aug 5, 2003
    #2
  3. Steve Rudd

    Steve Rudd Guest

    Thanks Joe,
    I was missing out on the car functions.

    Rgds, Steve
     
    Steve Rudd, Aug 5, 2003
    #3
  4. Steve Rudd

    Joe Burke Guest

    Steve,

    You're welcome.

    But in fact is probably makes more sense to take your initial approach:

    (setq ent (entsel))

    This way you can extract the point picked (cadr ent) or the ename (car ent).
    I can't recall how many times I thought I would need only one or the other,
    only to find later I needed both. Now I'm rewriting the program to cover my
    shortsighted mistake.

    Joe Burke
     
    Joe Burke, Aug 5, 2003
    #4
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.