Results 1 to 5 of 5

Thread: Little Help from my Friends

  1. #1
    I could stop if I wanted to CadDog's Avatar
    Join Date
    2005-06
    Location
    So Ca
    Posts
    439
    Login to Give a bone
    0

    Default Little Help from my Friends

    Hi everyone,

    This is a old lisp with opens current folder.

    Yes, I know that I can use dwg tab but it's just easier and faster to type a command.
    I having problem using this code with AutoCAD 2018 only.

    Here is the lisp:

    Code:
    (defun C:XE ()(Setvar "cmdecho" 0)
       (setq XXEE (strcat "explorer /e," (getvar "dwgprefix")))
       (command "start" XXEE)
       (Setvar "cmdecho" 1)
       (princ)
    )
    What I get now is this:

    C:\Users\caddog\Documents

    Again, works find with all other version but not with 2018.

    Thanks
    Last edited by rkmcswain; 2018-04-10 at 03:36 PM. Reason: added [CODE] tags

  2. #2
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Little Help from my Friends

    Hi,

    Please try the following code and let me know how you get on with it.

    Code:
    (defun c:OpenSource (/ target shell)
      ;; Tharwat - AUGI. 30.Mar.2018	;;
      (if (and (setq target (findfile (vl-string-right-trim "\\" (getvar 'DWGPREFIX) )))
               (setq shell (vla-getinterfaceobject (vlax-get-acad-object) "Shell.Application"))
           )
        (progn
          (vlax-invoke shell 'open target)
          (vlax-release-object shell)
         )
     )
     (princ)
    ) (vl-load-com)

  3. #3
    I could stop if I wanted to CadDog's Avatar
    Join Date
    2005-06
    Location
    So Ca
    Posts
    439
    Login to Give a bone
    0

    Default Re: Little Help from my Friends

    ... Works Great ...

    I'm back pumping out the work...

    Thanks Tharwat

    Your the Man

  4. #4
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Little Help from my Friends

    Quote Originally Posted by CadDog View Post
    ... Works Great ...

    I'm back pumping out the work...

    Thanks Tharwat

    Your the Man
    Excellent, You are welcome anytime.

  5. #5
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Little Help from my Friends

    Quote Originally Posted by CadDog View Post
    I having problem using this code with AutoCAD 2018 only.

    Again, works find with all other version but not with 2018.

    Thanks
    That is odd. It works fine here in 2018, and there is no reason for you to be having issues with it.

    Must be some other variable at play here.
    R.K. McSwain | CAD Panacea |

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •