2K5 Xplode use

Discussion in 'AutoCAD' started by 2k5drawer, Jan 12, 2005.

  1. 2k5drawer

    2k5drawer Guest

    Hello,

    This used to work fine in 2002 but not in 2005.

    (defun c:XP (/ SM)
    (setq SM(getvar "SNAPMODE"))
    (setvar "SNAPMODE" 0)
    (c:xplode)
    (setvar "SNAPMODE" SNM)
    )

    However, I can type XPLODE from the command line and after doing that typing the shortcut of XP works fine. Any Ideas?

    Thanks
     
    2k5drawer, Jan 12, 2005
    #1
  2. 2k5drawer

    Walt Engle Guest

    Change (c:xplode) to (explode)?
     
    Walt Engle, Jan 12, 2005
    #2
  3. Don't know about the xplode part, but the snapmode is being set to a
    different variable than what you want I think.

    last line should be (setvar "SNAPMODE" SM)


    typing the shortcut of XP works fine. Any Ideas?
     
    Casey Roberts, Jan 12, 2005
    #3
  4. 2k5drawer

    2k5drawer Guest

    Walt,

    I predominantly use the xplode command because of its "Inherit" function.
     
    2k5drawer, Jan 12, 2005
    #4
  5. 2k5drawer

    2k5drawer Guest

    Casey,

    Oops. I wrote it up kind of quickly and wrote that part incorrectly. I have one massive lisp file that contains all of my short cut lisp routines in it. Keeps from modifying the pgp and is very portable.

    Thanks
     
    2k5drawer, Jan 12, 2005
    #5
  6. 2k5drawer

    Walt Engle Guest

    Well, it's still looking for c:xplode(.lsp) isn't it?
     
    Walt Engle, Jan 12, 2005
    #6
  7. 2k5drawer

    2k5drawer Guest

    Yes, looking for it....maybe not. I don't know. All I know is that in 2002 (c:xplode) worked fine from within a lisp. In 2005 unless you actually type xplode at the command line, using (c:xplode) in a lisp routine like I use it... it no longer works.

    i.e.

    appload the XP.lsp
    (defun c:XP (/)
    (c:xplode)
    )

    first command in a new drawing
    command: XP
    ^^ Does not work ^^

    new drawing....
    command: xplode
    ^^ Works ^^

    appload the XP.lsp
    (defun c:XP (/)
    (c:xplode)
    )

    command: XP
    ^^ Works ^^

    Regards
     
    2k5drawer, Jan 12, 2005
    #7
  8. 2k5drawer

    Walt Engle Guest

    Been a long time since I programmed lsp, but I would delete the "c:" and use only (xplode).
     
    Walt Engle, Jan 12, 2005
    #8
  9. 2k5drawer

    T.Willey Guest

    XPlode looks like an external lisp routine or arx file. You have to make sure that it is loaded before you run your routine. I don't know what file loads it, maybe someone does, but to check for it you cand do.

    (if (not c:XPlode) (load "<lsp, arx, whatever file?"))

    Tim
     
    T.Willey, Jan 13, 2005
    #9
  10. Hello,

    Try it:

    (defun c:XP (/ SM)
    (setq SNM(getvar "SNAPMODE"))
    (setvar "SNAPMODE" 0)
    ;(arxload "acxplode.arx")(c:xplode);use it or above
    (if (not (member "acxplode.arx" (arx)))
    (arxload (findfile "acxplode.arx")))
    (c:xplode)
    (setvar "SNAPMODE" SNM)
    (princ)
    )


    :)

    Rogério
     
    Rogerio_Brazil, Jan 16, 2005
    #10
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.