UCS retreival

Discussion in 'AutoCAD' started by mnash, Jul 8, 2004.

  1. mnash

    mnash Guest

    I have a variable defined in my lisp. I would like to write a condittion where if the UCS exists, restore it, if it don't exist I want to load a DCL saying that it don't exist and escape the rest of the lisp. Here's what I got so far.

    (if (= <whatever> UCS1)(command "UCS" "R" UCS1)(load_dialog "UCS.dcl"))

    any comments?
     
    mnash, Jul 8, 2004
    #1
  2. mnash

    Tom Smith Guest

    You can test for existence with (tblsearch "ucs" <ucsname>).
     
    Tom Smith, Jul 8, 2004
    #2
  3. mnash

    David Bethel Guest

    (tblsearch "UCS" UCS1)

    There is a UCS table definiton for saved named UCSs

    -David
     
    David Bethel, Jul 8, 2004
    #3
  4. mnash

    mnash Guest

    thanks guys
     
    mnash, Jul 8, 2004
    #4
  5. mnash

    Tom Smith Guest

    Why not just use alert?

    I thought the same but left it alone. Using a dcl just to show an error
    message seems unnecessary . But using alert can be very annoying -- forcing
    the user to hit OK just because the function failed.

    Better to report failure on the command line without forcing the user to
    respond. Better still, create the missing UCS if it isn't there, and proceed
    normally.
     
    Tom Smith, Jul 8, 2004
    #5
  6. mnash

    mnash Guest

    I have the program working the way I wanted it to. You see it's not only myself using the lisp, its through the office, so I needed to be as user friendly as possible. But now it works like a charm. thanks for the discussions
     
    mnash, Jul 8, 2004
    #6
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.