Make list or Macro to close drawing without saving?

I would like to make a button that with one click of a mouse it would close a drawing without asking me to save. Often I open many drawings that I want to look at and then close with out saving. Is it possible with macros or lisp? I tried a macro, but it brings up file dialog box "save yes or no". It will not accept the "no" in the macro.

Reply to
lbbs
Loading thread data ...

Try this part of code:

(command "quit" "y")

You can place this code in the a button

Michel "lbbs" schreef in bericht news: snipped-for-privacy@news.vaxxine.com...

Reply to
m.h.schuurXiv-bouw-industrie.nlX=

Sorry, I should clarify. I would like to close each selected file with one mouse click. So if I have 4 drawing that I want to close, I would have to click 4 times. I don't want to "quite" because I always have some drawings in progress that I don't want to close. I tried to put (command "close" "n") in the button, and it recognizes the close command, but does not recognize the "n" (no) command.

e.g. Command: (command "close" "n") close Command: n Unknown command "N". Press F1 for help.

Reply to
lbbs

FWIW

From VBA, this Sub worked:

Sub CloseMe() ThisDrawing.Close End Sub

I'm sure you can call this same thing through the VLAX functions, I'm just not sure how, exactly you do it. If I find it, I'll repost.

Reply to
TomD

Reply to
lbbs

Go to this link

formatting link
and check out "ax:CloseAll". It closes all drawings but could be modified.

Reply to
TomD

How about Alt + F4 and hold down Alt and N?

Matthew

Reply to
Matthew

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.