Activating Layer States Manager with Lisp?

Discussion in 'AutoCAD' started by simonb, Dec 18, 2003.

  1. simonb

    simonb Guest

    Does anyone know if it's possible to activate the standard AutoCAD 2002 save and restore layer states manager dialog(s) using a lisp routine?? Also, is there a layer states manager routine available that will work on Xrefs? (Visretain to 0 then back to 1 doesn't do what i need, i.e. retain layer states in the parent dwg)
     
    simonb, Dec 18, 2003
    #1
  2. simonb

    liftedaxis Guest

    I ended up doing it another way. found you can fire the -lman command, but it won't fire from Lisp. so i create a script file on the fly, and then fire this script file (which works, but it must be the last thing your Lisp function does).
    my temp.scr file looks like:
    -lman
    i
    <layerstate filepath>
    r
    <layerstate name>

    may be a little unattractive, but it works.

    --Jeremiah
     
    liftedaxis, Dec 18, 2003
    #2
  3. simonb

    James Buzbee Guest

    Yes.

    I have all the companies layers, and layer states saved in a drawing located
    on the server. I have an app that lets users "read" in layer states -
    basically the app compares two lists and sets the layer in the active
    drawing based oon the satae of the layers in the "database" drawing (
    because if you import a layer state it will create the layers that aren't
    there - which sucks.) So, the app uses ObjectDBX to "open" the database
    drawing then uses an interface with the LayerStates Manager Object to
    restore a selected layer state, then creates a list of all the layers and
    thier states, creates a corresponding list of the layers in the active
    document, then changes the layers in the active document to match.

    So you'll need to look into:
    ObjectDBX
    the LayerState manager object
    a dialog for selecting layer states
    an engine for manipulating layers in the active document.


    jb
     
    James Buzbee, Dec 18, 2003
    #3
  4. simonb

    James Buzbee Guest

    but it won't fire from Lisp

    sure it will:

    (c:-lman)

    jb
     
    James Buzbee, Dec 19, 2003
    #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.