Author Topic: Open DWGVersion.exe from a command in a custom menu [resolved]  (Read 1731 times)

0 Members and 1 Guest are viewing this topic.

nini007

  • Newt
  • Posts: 58
Open DWGVersion.exe from a command in a custom menu [resolved]
« on: September 03, 2018, 06:02:51 AM »
Hello forum,
I need your lights. :-)
I created a personal menu and I would like to open from this menu a "DWGVersion" application   :-D
I have this code below that works to open a lisp but unfortunately does not work for an exe, I have this message: "; error: incorrect read character (octal): 0 »  :-(
Does someone have an idea ? :idea:

Code: [Select]
^C^C((lambda ( exe ) (if (findfile exe) (load exe nil) (princ (strcat (chr 10) exe " not found.")))) "C:/Program Files/Autodesk/AutoCAD 2018/Support/DWGVersion/DWGVersion.exe")

thank you in advance
Best regards
« Last Edit: September 04, 2018, 07:53:07 AM by nini007 »

ribarm

  • Gator
  • Posts: 3297
  • Marko Ribar, architect
Re: Open DWGVersion.exe from a command in a custom menu
« Reply #1 on: September 03, 2018, 11:22:59 AM »
What does this do :

Code: [Select]
^C^C(startapp "C:/Program Files/Autodesk/AutoCAD 2018/Support/DWGVersion/DWGVersion.exe")
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

nini007

  • Newt
  • Posts: 58
Re: Open DWGVersion.exe from a command in a custom menu
« Reply #2 on: September 04, 2018, 07:52:23 AM »
Hello :-),

Thanks super it works flawless  :smitten:

Best regards :wink:

maicy

  • Mosquito
  • Posts: 12
Re: Open DWGVersion.exe from a command in a custom menu [resolved]
« Reply #3 on: October 19, 2018, 03:55:50 AM »
(defun xxx_dos_execute ( exefile fullsreen wait / exec )
  (and (setq exec (vlax-create-object "wscript.shell"))
       (progn
          (vlax-invoke exec
                      'run
                      exefile
                      (if fullsreen 3 5)  ; 2 runs in the background. 3 fullsreen 5 windows
                      (if wait 1 0)       ; 1 Wait until the end of operation
          )
          (vlax-release-object exec)
       )
  )
  (princ)
)
;(xxx_dos_execute "c:\\windows\\notepad.exe" T nil)
;(xxx_dos_execute "c:\\windows\\notepad.exe d:\\1.txt" T nil)
;(xxx_dos_execute "\"C:\\Program Files\\paint.net\\PaintDotNet.exe\" \"d:\\1.jpg\"" T nil)
;(xxx_dos_execute "regedit" T T)
;(xxx_dos_execute "\"C:/Program Files/Autodesk/AutoCAD 2018/Support/DWGVersion/DWGVersion.exe\"" nil T)