HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

How can I make opening an AutoCAD drawing cause it to close after scaling only, without any prompt to save?

2009-02-05View Original

Thread Content

It often happens that when you open an AutoCAD drawing just to take a look, you need to use the mouse wheel to zoom in and out. As a result, when you exit CAD, it asks whether you want to save the changes, which is quite annoying. CAXA Electronic Drawing Board does not have this problem. Is there anyone who can write a LISP program or use some other method to change this situation?
Reply #22009-02-05
Save with z+space+e+space; no scaling will be needed when opening it later. Last edited by leonnie on 2009-2-5 11:17.]
Reply #32009-02-05
I’m not quite sure; please explain in more detail. Thank you very much
Reply #42009-02-05
(vl-load-com) (setq *acad* (vlax-get-acad-object)) (setq *doc* (vlax-get-property *acad* 'ActiveDocument)) (defun c:0 () (command "quit" "n")) Enter 0 and press Enter to exit without saving! ! !
Reply #52009-02-05
Your drawing methods aren’t very standardized. What I mean is, after drawing, display the image in full screen and then save it – that’s how to do it properly. Saving preserves the final state of the image; when you open it again, it will be displayed in full screen. It’s very simple; don’t change anything – it’s a matter of good drawing habits. For the drawings that others give you, you can also save them after viewing the entire image; this way, there’s no need to worry about such things
Reply #62009-02-05
The problem is that one has to zoom in on a certain part in order to view it
Reply #72009-02-05
You didn’t understand what LZ meant at all; don’t draw conclusions rashly! ! ! This post was last edited by aicr317 on 2009-2-5 12:58.]
Reply #82009-02-05
I also feel that the gentlemen here haven’t fully understood what I meant
Reply #92009-02-05
You can use the things I share with complete confidence; they were all written by me and tested in practice to ensure they work before being shared – they weren’t copied from anywhere else!
Reply #102009-02-05
What you mean, as I understand it, is: you just want to open and view a certain image, and while viewing it it’s inevitable to use the mouse to zoom in on or out from certain areas. As a result, even if you don’t perform any other actions, when you click to close the window in the top right corner, the system will ask whether you want to save it! You just want, after pressing close, not to see this prompt but to exit directly (without saving)! My programs may not be great, but my language skills are solid, haha! Joking!
Reply #112009-02-05
Actually, the method (function) you mentioned requires only double-clicking the middle button of the mouse (the scroll wheel), or adding the “Full Image” command to the toolbar and clicking on it – it’s very convenient.
Reply #122009-02-05
This understanding is also entirely my own idea; thank you.
Reply #132009-02-05
(defun c:go123( ) ;This program is used to exit CAD without prompting for a save; use it with caution to avoid losing your work. (command "quit" "n" "n") ) (prompt "It was drawn by Dragon! Enjoy it!”) Okay. Here, go123 is the name of the command; you can choose any name as long as it follows the naming rules and does not duplicate an existing command. Usage: 1. Type the above text into Notepad and save it as a go123.lsp file. 2. Locate the acad.mnl file; by default, it is installed in Application Data\Autodesk\AutoCAD 200i\Support. Of course, you can move this file to your own CAD directory as well. 3. Copy the go123.lsp file you created into the Support directory of ACAD; if the path already points to your directory, then it’s not necessary to copy it there. Add the following text to acad.mnl. ( if (null C:go123) (load \"go123\") (princ) ); Loads and executes the go123 command from the written go123.lsp file. Disadvantage: This method does not prompt you to save before exiting; if you have multiple drawings open, they will all be exited without being saved. So be careful when using it so as not to waste your effort. Be cautious. Don’t say I didn’t warn you! (Actually, it’s still recommended to exit by using: z+space+e+space, and then exit.) This post was last edited by fl202 on 2009-2-5 at 14:31.]

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.