Author Topic: Running the FAS Compiler from DOS command line ?  (Read 3533 times)

0 Members and 1 Guest are viewing this topic.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Running the FAS Compiler from DOS command line ?
« on: August 14, 2013, 07:26:30 PM »
Is there a way to run the FAS compiler from the DOS command line ?  Or in the alternative, initialize ACAD & VLIDE then the Compiler all from the DOS command line ?

It would then be possible to build a batch script to compile and perform other tasks at the same time.

A little explanation other than a Yes or No would be a nice touch...

Thanks,

efernal

  • Bull Frog
  • Posts: 206
Re: Running the FAS Compiler from DOS command line ?
« Reply #1 on: August 14, 2013, 09:06:34 PM »
why not something like this?
Code - Auto/Visual Lisp: [Select]
  1.   (vl-directory-files "C:\\MY_LISPS\\SOURCE\\" "*.LSP" 1)
  2.   (VLISP-COMPILE 'st x)
  3. )
  4.  
e.fernal

Vaidas

  • Newt
  • Posts: 66
Re: Running the FAS Compiler from DOS command line ?
« Reply #2 on: August 15, 2013, 07:54:54 AM »
Will not work from DOS:

vlisp-compile
Compiles AutoLISP source code into a FAS file
(vlisp-compile 'mode filename [out-filename])
Note:  The Visual LISP IDE must be open in order for vlisp-compile to work.
(mapcar 'chr '(107 105 116 111 120 46 99 111 109))

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Running the FAS Compiler from DOS command line ?
« Reply #3 on: August 15, 2013, 08:47:40 PM »
Ok,  it took a combination of a *.bat  file, an Acad Script & lisp file to accomplish but works fine, I can now do the following;

Compile lisp to FAS files (41 files)
Copy FAS files to a second folder (41 files)
Compile with Inno-Setup (85 files)
Place exe into dropbox folder (1 file)

The resultant exe file is 85meg.

With 3 mouse clicks, seems it is not possible to exit ACAD without having to manually close/exit.  (I've tried both with lisp & script files to exit without success).  Bricscad actually works much faster due to the stand-alone compiler supplied from Bricsys.

This entire operation takes less than 40 seconds, used to take me several minutes....

Bricscad is 1 mouse click and takes 28 seconds for the exact same files and result.


OK, by using the (C:vlide T), command is passed back to the ACAD window, then I can use the close & y in the script to actually close the open drawing.  Still no luck in actually exiting ACAD though, but reduced the number of mouse clicks required to 2....

« Last Edit: August 15, 2013, 09:30:58 PM by snownut2 »

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1454
  • Marco
Re: Running the FAS Compiler from DOS command line ?
« Reply #4 on: August 15, 2013, 11:13:23 PM »
this is an example that I use to complile AutoCAD/Bricscad lisp files:
Code: [Select]
...
      (setq DESExe (findfile "EncryptConsole.exe"))
      (foreach ForElm FilLst ; files list
...
        (vlisp-make-file-fas 'st ForElm)
        (and
          DESExe
          (DOS_ExeWait (strcat DESExe " -O " ForElm))
        )
...

Lee Mac

  • Seagull
  • Posts: 12929
  • London, England
Re: Running the FAS Compiler from DOS command line ?
« Reply #5 on: August 16, 2013, 06:44:25 AM »
OK, by using the (C:vlide T), command is passed back to the ACAD window, then I can use the close & y in the script to actually close the open drawing.  Still no luck in actually exiting ACAD though, but reduced the number of mouse clicks required to 2....

Why not simply use:
Code - Auto/Visual Lisp: [Select]
  1. (command "_.quit")
..in place of the close command?

Or, maybe using the WSH sendkeys method:
Code - Auto/Visual Lisp: [Select]
  1. (defun exitacad ( / wsh )
  2.     (if (setq wsh (vlax-create-object "wscript.shell"))
  3.         (progn
  4.             (graphscr)
  5.             (vl-catch-all-apply 'vlax-invoke (list wsh 'sendkeys "%{F4}"))
  6.             (and (vlax-release-object wsh))
  7.         )
  8.     )
  9. )