setting

Discussion in 'AutoCAD' started by rojren, Jan 7, 2005.

  1. rojren

    rojren Guest

    I am all but illiterate with LISP.

    How do I get the layer color to reset to bylayer after the lisp command runs?

    I've tried adding (command "color" "bylayer" ) and (command "color" "256" ) as suggested elsewhere, but it doesn't work.

    Thanks.
     
    rojren, Jan 7, 2005
    #1
  2. rojren

    OLD-CADaver Guest

    (setvar "cecolor" "bylayer")
     
    OLD-CADaver, Jan 7, 2005
    #2
  3. rojren

    Chip Harper Guest

    (command ".-color" "bylayer")

    or

    (setvar "cecolor" "bylayer")
     
    Chip Harper, Jan 7, 2005
    #3
  4. rojren

    ecable Guest

    Try (setvar "cecolor" "bylayer")
    Should work.
     
    ecable, Jan 7, 2005
    #4
  5. rojren

    ecable Guest

    Also instead of
    (terpri)
    (setq dper (getstring "DPER NUMBER : " t))
    (terpri)

    Just use
    (setq dper (getstring "\nDPER NUMBER : " t))
    For a new command line
     
    ecable, Jan 7, 2005
    #5
  6. rojren

    rojren Guest

    Thanks.

    I seem to be doing something wrong though. I'm still getting the color as 100 after the lisp runs.
     
    rojren, Jan 7, 2005
    #6
  7. rojren

    OLD-CADaver Guest

    (command "color" "bylayer")
    or
    (setvar "cecolor" "bylayer")

    Notice quotes and CEcolor for the setvar.
     
    OLD-CADaver, Jan 7, 2005
    #7
  8. rojren

    rojren Guest

    ..
    Well, I tried it, but like I said, I seem to be doing something wrong.

    I'll type in "dper1" and everything works, except the textcolor remains set at 100.
     
    rojren, Jan 7, 2005
    #8
  9. rojren

    Paul Turvill Guest

    Maybe you should post your code.
    ___
     
    Paul Turvill, Jan 7, 2005
    #9
  10. rojren

    rojren Guest

    It's attached to my previous post.
     
    rojren, Jan 7, 2005
    #10
  11. rojren

    Paul Turvill Guest

    Sorry, missed that. However, your code works fine for me. Creates the text
    in color 100, then switches back to color ByLayer.
    ___
     
    Paul Turvill, Jan 7, 2005
    #11
  12. rojren

    rojren Guest

    ..
    Well, I think I found my problem. The AutoCAD installation I was using this LISP on is getting flaky. I tried it on two others, and it works.

    Go figure.

    Thanks, all.
     
    rojren, Jan 7, 2005
    #12
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.