Importing Lman Layer States

Discussion in 'AutoCAD' started by jlspartz, Dec 17, 2004.

  1. jlspartz

    jlspartz Guest

    I just wrote some code to import layer states into lman and I can't figure out why it isn't working. Here's the code:

    (defun c:lmanlsimport ()
    (setvar "cmdecho" 0)
    (setvar "filedia" 0)
    (c:-lman)
    (command "import" "PRALayerStates.lay" "")
    (setvar "cmdecho" 1)
    (setvar "filedia" 1)
    (princ)
    )

    It stops after executing the lman. It doesn't do my commands after it.
     
    jlspartz, Dec 17, 2004
    #1
  2. jlspartz

    T.Willey Guest

    Is it because "lman" is lisp routine? Isn't it not part of the ACAD core program?

    Just thinking out loud. Other then that I don't know.

    Tim
     
    T.Willey, Dec 17, 2004
    #2
  3. jlspartz

    jlspartz Guest

    That's why I call it up as (c:-lman) But I expect to be able to put in commands after it is running in the command prompt. I wonder if it takes a split second to load so I need to pause the lisp for a second and then put in the commands. I will try that.
     
    jlspartz, Dec 17, 2004
    #3
  4. jlspartz

    Tom Smith Guest

    I need to pause the lisp for a second ...

    No. The error you get is "can't reenter AutoLISP" which is telling you this
    ain't gonna work. You can't start a lisp running and then use another lisp
    expression to feed it an answer.

    You could probably do this by way of a script or menu macro of the form
    ^c^c-lman;import;<etc>

    Or alternatively, why not do the same thing with the core LAYER command?
    this avoids the lisp difficulty. Since layer states have been added to the
    core functions, it shouldn't be necessary to use LMAN at all. Then your lisp
    approach would work (command "layer" "state" "import" <etc>).
     
    Tom Smith, Dec 21, 2004
    #4
  5. jlspartz

    jlspartz Guest

    Right, it does work with the -layer command. And I have that made. I have it set up to import the layer manager layer states with lisp, and what I had to do with the lman states was make a separate script file and then with lisp run the script. I'm setting up automation for both types of layer states, so people can do anything they'd like to to whichever one they want to use. The only thing I'm missing is the conversion in the migration tools that Autodesk gives you. For some reason, I can't install the package. It tells me I need ADT2005, which I do, but it's not seeing it for some reason. I need the AcLSConvert.arx and AcLSConvertRes.dll files if anyone has them out there.
     
    jlspartz, Dec 21, 2004
    #5
  6. I had the same problem. I had to temporarily install 2004 to get it to
    work. It wouldn't see my 2005. Try it, if you still have access to 2004.
     
    Daniel J. Altamura, R.A., Dec 31, 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.