Layer States

Discussion in 'AutoCAD' started by Frankie Golaub, Apr 21, 2004.

  1. Hi,
    I'm wondering if there is a simple routine for saving the current layer
    states - similar to the LMAN command in express tools.
    I want to save the layer states, then turn on, thaw, unlock all layers and
    perform a complete scaling of the drawing and then restore the layer state
    back to its original form and finally delete the layer state. I can't use
    the Lman command because it uses dialog boxes and requires user input. I
    think that in 2000i you can use the layer command to do this but it is not
    available in 2000 which we still use.
    If possible, I would like to see this in autolisp only because thats all I
    know and I'll be able to understand it a little better, but whatever format
    is available will be great.


    Cheers,

    Frankie Golaub.
     
    Frankie Golaub, Apr 21, 2004
    #1
  2. Frankie Golaub

    mnelson Guest

    I'm basically doing the same thing here. This uses the standard layer state in AutoCAD as you can see. You can just edited this and be close to done. The focus here is to convert old style p-lines on a particular layer and restoring the DWG as found.

    (defun c:pLCONVERT (/ CTM CLA)
    (setq CTM (getvar "tilemode"))
    (setq CLA (getvar "clayer"))
    (setvar "tilemode" 1)
    (command "layer" "a" "s" "$PLconvert" "" "" "")
    (command "layer" "s" "0" "f" "*" "t" "rm*" "")
    (setvar "plinetype" 2)
    (command "convert" "p" "all" "")
    (command "layer" "a" "r" "$PLconvert" "d" "$PLconvert" "" "")
    (command "regen")
    (setvar "clayer" CLA)
    (setvar "tilemode" CTM)
    (princ "\n Complete...")
    (princ "\n RM Polylines have been converted to LWPolylines")
    (princ)
    )
     
    mnelson, Apr 26, 2004
    #2
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.