Script that saves and closes Bricscad?

Hi,
I recorded a simple script that just draws a line. Next step is to get the script to save the file and then close Brics but I obviously don't know how to do it!?

_line
0.000,0.000
50222.059,39670.452

_save
_WCLOSE
_stopscript

Comments

  • Anthony Apostolaros
    edited November 2022
    WCLOSE just closes the active .dwg file.
    To close all open files and exit Bricscad, use the QUIT command.
    It won't work without user input if any of the open files haven't been saved.
  • WCLOSE just closes the active .dwg file.
    To close all open files and exit Bricscad, use the QUIT command.
    It won't work without user input if any of the open files haven't been saved.

    Should I put QUIT before _stopscript? I want to pass the script to Brics through a windows shortcut.
  • Remove _WCLOSE and _stopscript, and replace those with:
    _QUIT
    _Y
  • Thanks for the suggestions. Will try this between xmas and new years :)
  • My comment is completely off-topic, but you remind me of the "end" command in AutoCAD V10.

    It would immediately quit AutoCAD without saving. The fact that the "end" command corresponded with a snap command, meant that hours of work were sometimes lost. And this was in the days when a larger drawing could take a noticeable amount of time to save, so you not as prone to saving.