won't work in A2K4

Discussion in 'AutoCAD' started by Debi Olson, Jul 1, 2004.

  1. Debi Olson

    Debi Olson Guest

    I created this routine with a lot of help from this group. It puts dimensions onto the correct layer as they are created and restores the current layer to the one you started on. It worked fantastic in A2K2 but chokes in A2K4. I won't be upgrading anytime soon so I'd like to be able to make this work.

    Any suggestions would be so appreciated.

    Thanks
     
    Debi Olson, Jul 1, 2004
    #1
  2. Debi Olson

    R.K. McSwain Guest

    I created this routine with a lot of help from this group. It puts dimensions onto the correct layer as they are created and restores the current layer to the one you started on. It worked fantastic in A2K2 but chokes in A2K4. I won't be upgrading anytime soon so I'd like to be able to make this work.

    Any suggestions would be so appreciated.

    ==============================================================

    Do you use the visual lisp editor to edit your lisp files?
    If not, open it up [command: VLIDE], and then open this file.

    After loading it and running it here, I get "Error: bad argument type: stringp nil"

    You can debug this in the visual lisp editor by choosing "View | Error Trace"

    This will open up the Error Trace window which shows the line ==> (SUBSTR nil 1 1)

    Looking back at the code, it reads (substr LMENU 1 1) ==> this tells you that LMENU is nil

    LMENU does not appear in the code anywhere else, so nothing is setting LMENU to a value.
    In your R2002, do you perhaps have another routine that set LMENU to something at startup?
     
    R.K. McSwain, Jul 1, 2004
    #2
  3. Debi Olson

    Debi Olson Guest

    R.K.,
    Yes, I do use the vlisp editor but I haven't learned how to use the
    debugging stuff properly yet. I still don't understand what some of these
    things are telling me. I did comment that line (LMENU...) out but it didn't
    change anything. Is there something else I'm not understanding?

    Thanks,
    --
    Debi

    remove no spam to email


    I created this routine with a lot of help from this group. It puts
    dimensions onto the correct layer as they are created and restores the
    current layer to the one you started on. It worked fantastic in A2K2 but
    chokes in A2K4. I won't be upgrading anytime soon so I'd like to be able to
    make this work.

    Any suggestions would be so appreciated.

    ==============================================================

    Do you use the visual lisp editor to edit your lisp files?
    If not, open it up [command: VLIDE], and then open this file.

    After loading it and running it here, I get "Error: bad argument type:
    stringp nil"

    You can debug this in the visual lisp editor by choosing "View | Error
    Trace"

    This will open up the Error Trace window which shows the line ==> (SUBSTR
    nil 1 1)

    Looking back at the code, it reads (substr LMENU 1 1) ==> this tells you
    that LMENU is nil

    LMENU does not appear in the code anywhere else, so nothing is setting
    LMENU to a value.
    In your R2002, do you perhaps have another routine that set LMENU to
    something at startup?
     
    Debi Olson, Jul 1, 2004
    #3
  4. Debi Olson

    ECCAD Guest

    Debi,
    Like R.K. said, your routine does not 'set' the value of the variable named 'LMENU' anywhere. Hence, when referencing that symbol name (as a string), an error will occur. You also have (2) occurrances of the LMENU variable..
    So, uncomment that line that you commented out..
    And, do a little digging to find out what LMENU was set to in your R2002..(if it is still there). You should find some (setq LMENU "some value") in your old setup somewhere.
    It looks like the routine is using just the 1st character of whatever LMENU was set to..and making a Layer name with the 1st character of LMENU + "DI". Perhaps you can tell what LMENU (should be), and if that is the case..add this:
    (setq LMENU "C"); assumes 1st char was a C.

    Bob
     
    ECCAD, Jul 1, 2004
    #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.