Layer off

Discussion in 'AutoCAD' started by Adesu, Aug 9, 2004.

  1. Adesu

    Adesu Guest

    (command ".layer" "m" "Title" "c" 250 "")
    (setq p5 (polar p4 (dtr 90) 131)
    p6 (polar p5 (dtr 180) 318)
    p7 (polar p6 (dtr 270) 131))
    (command "_line" p2 p5 p6 p7 "c" "")
    (command "_ >>>>Layer name title
    then off,how format formula for layer off,anybody help me,thanks
     
    Adesu, Aug 9, 2004
    #1
  2. Adesu,

    Essentially, just pass the same text to the layer command that you would if you were turning the layer off from the command line. In this case, you can use the command "-layer" rather than "layer" to test for the correct sequence. It will most likely be something like this:

    (command "_layer" "_off" "title" "_yes" "")

    As you will see when testing the -layer command - you will be asked whether or not you want to turn off the current layer ("title" is current because you use the _make option in the layer command earlier in your function). I say "probably" because the Expert variable setting can affect the behavior of the "layer" command.

    Once you are comfortable with lisp - you will probably begin to avoid using the "command" function unless absolutely necessary.

    Peter
     
    petersciganek, Aug 9, 2004
    #2
  3. Adesu

    Adesu Guest

    Hi petersciganek,thanks for your helps,sorry rather late !
    if you were turning the layer off from the command line. In this case, you
    can use the command "-layer" rather than "layer" to test for the correct
    sequence. It will most likely be something like this:
    whether or not you want to turn off the current layer ("title" is current
    because you use the _make option in the layer command earlier in your
    function). I say "probably" because the Expert variable setting can affect
    the behavior of the "layer" command.
    using the "command" function unless absolutely necessary.
     
    Adesu, Aug 23, 2004
    #3
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.