Invalid selection at vla-Getentity

Discussion in 'AutoCAD' started by StefVdM, Oct 12, 2004.

  1. StefVdM

    StefVdM Guest

    Hi all,

    If I use the following line of code:

    (setq check (vl-catch-all-apply 'vla-GetEntity (list utility 'Object 'PP "\nSelect object: ")))

    then:

    1. check will be nil if I select an object
    2. vla-GetEntity will raise an error when I click on the screen without selecting an entity
    3. vla-GetEntity will raise the SAME error when I just hit "Enter" at the prompt

    Is there a way to make the difference between case 2 and 3?

    Thanks for the help!

    Stef
     
    StefVdM, Oct 12, 2004
    #1
  2. StefVdM

    Jürg Menzi Guest

    Hi Stef

    Use:
    Code:
    (vla-InitializeUserInput utility 0 " ")
    (setq check (vl-catch-all-apply
    'vla-GetEntity (list utility 'Object 'PP "\nSelect object: ")
    )
    )
    
    and you get two different errors...

    Cheers
     
    Jürg Menzi, Oct 12, 2004
    #2
  3. StefVdM

    StefVdM Guest

    Hi Jürg,

    sorry for the late answer, I was suddenly overwhelmed by urgent jobs.

    But, vla-InitializeUserInput did the trick! Thanks for the tip.

    Cheers

    Stef
     
    StefVdM, Oct 15, 2004
    #3
  4. StefVdM

    Jürg Menzi Guest

    Welcome...¦-)

    Cheers
     
    Jürg Menzi, Oct 15, 2004
    #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.