<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Prompt Message When Closing a Drawing in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192325#M101158</link>
    <description>&lt;P&gt;Kent, that is pretty much what I'm looking for. However, after I select yes it asks: "Really want to discard the changes to this drawing? &amp;lt;N&amp;gt;:" How would I be able to get rid of that? If there's no way to get rid of it the code does the trick. And I really like that it's a forced answer.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Aug 2018 18:11:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-08-10T18:11:38Z</dc:date>
    <item>
      <title>Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191901#M101152</link>
      <description>&lt;P&gt;Is there a way to nix the "close" command and redefine it to include a message?&lt;/P&gt;&lt;P&gt;I'd like to get our guys in the habit of always making sure they are putting revision dates on their drawings. So I'd like have the message "Have you updated Revision Dates for this drawing?" with a YES/NO input from the user come up when they close a drawing. After that, it would bring up the normal save/close screen.&lt;/P&gt;&lt;P&gt;How could I accomplish this?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 15:14:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191901#M101152</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-10T15:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191908#M101153</link>
      <description>&lt;P&gt;What about automating adding these dates? That would kill two birds with one code. Post a sample drawing.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 15:18:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191908#M101153</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-08-10T15:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191926#M101154</link>
      <description>&lt;P&gt;Do some Searching.&amp;nbsp; This [or something very similar] has come up before.&amp;nbsp; There's probably a solution involving UNDEFINE-ing the CLOSE and EXIT and QUIT commands, and making new definitions of&amp;nbsp;them that would ask that question of the User first -- probably not a difficult thing to build if you don't find anything suitable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[I seem to recall that the upper-right-corner-X way of Closing didn't always actually &lt;EM&gt;use&lt;/EM&gt;&amp;nbsp; the CLOSE command, so there was the problem of invoking such a thing when that was picked.&amp;nbsp; But checking now in Acad2016 that I have here, the individual-drawing X &lt;EM&gt;does&lt;/EM&gt;&amp;nbsp; call up CLOSE, and the overall-program X does call up QUIT, so custom command definitions ought to work.]&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 15:25:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191926#M101154</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-10T15:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191930#M101155</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;What about automating adding these dates? That would kill two birds with one code.&amp;nbsp;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The OP may disagree, but I don't like that idea.&amp;nbsp; If&amp;nbsp;I just open a drawing to refer to something, or Copy something from it to Paste into another drawing, but don't actually do anything that changes it, or even if I do something but then decide to Undo it all, I wouldn't want it to register as a revision.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 15:29:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191930#M101155</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-10T15:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191935#M101156</link>
      <description>&lt;P&gt;Sure .. that's why I asked for a sample drawing. There are usually some conditions to follow and IMO taking the user out of the equation yields more consistent results .. but that's just me. 8-)&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 15:35:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191935#M101156</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-08-10T15:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191992#M101157</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;custom command definitions ought to work.]&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In simplest terms:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(command "_.undefine" "CLOSE")
(defun C:CLOSE (/ yesno)
  (initget 1 "Yes No"); no Enter allowed -- must answer the question
  (setq yesno (getkword "\nHave you updated Revision Dates for this drawing? [Yes/No]: "))
  (if (= yesno "Yes")
    (command "_.close")
    (quit); that is, quit &lt;EM&gt;this routine&lt;/EM&gt; -- not the same as QUIT &lt;EM&gt;command&lt;/EM&gt;
  ); if
); defun&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;BUT&lt;/STRONG&gt;&lt;/FONT&gt; that assumes you &lt;EM&gt;always&lt;/EM&gt;&amp;nbsp; want them to update the revision date [or to lie about it], regardless of what they may have done or not done in the drawing, because it won't invoke the native CLOSE command unless they answer "Yes."&amp;nbsp; Should there be some kind of "No, but there's no reason to" option, for the situations I mentioned in my Reply to&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;'s automating suggestion?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It could also be built to have either Yes or No offered as a &lt;EM&gt;default&lt;/EM&gt;&amp;nbsp; answer, requiring only Enter/space to accept it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that [or a more flexible version if needed] works, do the same with EXIT and QUIT.&amp;nbsp; But in all cases, there's the work-around possibility for those who don't want to be bothered, and who are knowledgeable enough, that they can just type in &lt;FONT color="#ff0000"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/FONT&gt;CLOSE [with the decimal/period prefix], and get the native command directly, bypassing the re-definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp; Fixed the code [I left out an important part before...], so if you copied it before this EDIT appeared, try again.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 16:01:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8191992#M101157</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-10T16:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192325#M101158</link>
      <description>&lt;P&gt;Kent, that is pretty much what I'm looking for. However, after I select yes it asks: "Really want to discard the changes to this drawing? &amp;lt;N&amp;gt;:" How would I be able to get rid of that? If there's no way to get rid of it the code does the trick. And I really like that it's a forced answer.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 18:11:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192325#M101158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-10T18:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192394#M101159</link>
      <description>&lt;P&gt;It&amp;nbsp;tends to lock up at the "Really want to discard all changes to drawing?"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 18:36:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192394#M101159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-10T18:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192417#M101160</link>
      <description>&lt;P&gt;Be aware that when your users get tired of your prompt they can easily bypass with &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/FONT&gt;close. Might consider using a&amp;nbsp;&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-AutoLISP/files/GUID-EC61BEC2-39B9-4CD1-BE3B-7781DF1E3530-htm.html" target="_blank"&gt;&lt;STRONG&gt;reactor&lt;/STRONG&gt;&lt;/A&gt; instead.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 18:43:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192417#M101160</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-08-10T18:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192493#M101161</link>
      <description>&lt;P&gt;And if you stick to this method, maybe this will do. IMO there should be another check to see if this date question is even relevant to the current drawing.&lt;/P&gt;&lt;PRE&gt;(command "_.undefine" "_.close")
(defun c:close nil
  (cond	((= 1 (getvar 'writestat))
	 (initget 1 "Yes No")
	 (if (= (getkword "\nHave you updated Revision Dates for this drawing? [Yes/No]: ") "Yes")
	   (vl-cmdf "_.qsave" "_.close" "_Yes")
	   (print (strcat "Update the dates " (getenv "username") " or I'll release the kraken!"))
	 )
	)
	((vl-cmdf "_.close" "_n"))
  )
  (princ)
)
(vl-load-com)&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Aug 2018 19:21:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192493#M101161</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2018-08-10T19:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192544#M101162</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;after I select yes it asks: "Really want to discard the changes to this drawing? &amp;lt;N&amp;gt;:" How would I be able to get rid of that? If there's no way to get rid of it the code does the trick. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's because of this from Message 1:&amp;nbsp; "...with a YES/NO input from the user come up when they close a drawing. After that, it would bring up the normal save/close screen."&amp;nbsp; I assumed that since it's about the CLOSE command, the end of that should really&amp;nbsp;say "it would bring up the normal close command,"&amp;nbsp;and I also assumed that it should do so only if the answer about updating the revision date was "Yes" [because if it was "No," you'd want them to do that before Closing]. &amp;nbsp;In the case of a "Yes" answer, it's still possible that a User might have updated the revision date earlier on,&amp;nbsp;&lt;EM&gt;and&lt;/EM&gt;&amp;nbsp; might have done some other things since, which would trigger that prompt, and I would think you'd want that to be asked, not to&amp;nbsp;get rid of&amp;nbsp;it.&amp;nbsp; If you really do want it bypassed, do I assume correctly that you would want the answer about discarding changes to be "No," so that what's been done would be saved?&amp;nbsp; If so, you can change the one line&amp;nbsp;to add the answer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(command "_.close" &lt;FONT color="#0000ff"&gt;&lt;STRONG&gt;"_no"&lt;/STRONG&gt;&lt;/FONT&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which seems to also eliminate the hanging up problem in your other Message. &amp;nbsp;[I can't otherwise explain that -- it&amp;nbsp;also hangs up&amp;nbsp;at that prompt for me when I run just (command "_.close") manually, but not when I include the "_no" answer.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[I find it quite curious, but noteworthy,&amp;nbsp;that if there have been changes since the last saving operation, the &lt;EM&gt;dialog-box&lt;/EM&gt;&amp;nbsp; CLOSE command prompt is whether you want to &lt;EM&gt;Save&lt;/EM&gt;&amp;nbsp; changes, but the command-line prompt is whether to &lt;EM&gt;discard&lt;/EM&gt;&amp;nbsp; them.]&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 19:56:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192544#M101162</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-10T19:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192796#M101163</link>
      <description>A method to consider, which I had employed at a previous office&lt;BR /&gt;is to redefine the QSAVE command. When a user commits to changes&lt;BR /&gt;to a file, the "last saved date" is applied to a text object.&lt;BR /&gt;&lt;BR /&gt;At that time I only considered one text object to update but the method&lt;BR /&gt;could be expanded to a revision date table. Manipulation of a table is&lt;BR /&gt;not something I have investigated yet.&lt;BR /&gt;&lt;BR /&gt;Original:&lt;BR /&gt;One will need to register an application and add extended code to a&lt;BR /&gt;text object in order to find the object. The downside is one can easily&lt;BR /&gt;copy this object and use it elsewhere without knowledge that the&lt;BR /&gt;text value is subject to change (yes, this has happened to us - and it&lt;BR /&gt;was our employer that did this!).&lt;BR /&gt;&lt;BR /&gt;If I had to do it over again:&lt;BR /&gt;Retain the QSAVE thought and use an attributed title block (with both&lt;BR /&gt;the date and loginname).&lt;BR /&gt;&lt;BR /&gt;???&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Aug 2018 22:30:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192796#M101163</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2018-08-10T22:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192936#M101164</link>
      <description>&lt;P&gt;You are on the right track.&lt;/P&gt;&lt;P&gt;Somewhere I have the whole setup I've used for years to maintain a drawing history.&amp;nbsp; It uses a reactor and checks the value of DBMOD.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 01:44:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8192936#M101164</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-08-11T01:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8196443#M101165</link>
      <description>&lt;P&gt;So, thinking about the other opinions on should this be for each drawing or not, is there a way that it could look at the drawing to see if our title block exists? If it finds the block it will use the redefined command and if not it will use the _.close command?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 18:55:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8196443#M101165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-13T18:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8196728#M101166</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;wrote:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;....&amp;nbsp;is there a way that it could look at the drawing to see if our title block exists? If it finds the block it will use the redefined command and if not it will use the _.close command?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the Title Block is not a &lt;EM&gt;dynamic&lt;/EM&gt;&amp;nbsp; Block [for which the "name" of an &lt;EM&gt;insertion&lt;/EM&gt;&amp;nbsp; of it isn't the Block name itself], you can find out this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(ssget "_X" '((2 . "&lt;EM&gt;&lt;FONT color="#00ccff"&gt;YourTitleBlockName&lt;/FONT&gt;&lt;/EM&gt;")))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that returns &lt;EM&gt;other than nil&lt;/EM&gt;,&amp;nbsp;then&amp;nbsp;at least one insertion [or Xref] of it&amp;nbsp;exists in the current drawing.&amp;nbsp; [If there's no &lt;EM&gt;insertion&lt;/EM&gt;&amp;nbsp; of it, but the &lt;EM&gt;definition&lt;/EM&gt;&amp;nbsp; exists in the drawing, that code won't reveal the fact, but that can also be determined if needed.]&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 20:33:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8196728#M101166</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-08-13T20:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8196952#M101167</link>
      <description>&lt;P&gt;&amp;nbsp;A commandwillstart reactor can allow you to check the drawing and do many things before the command actually takes place.&amp;nbsp; But you may prefer to use a beginsave reactor to modify the drawing before it's actually saved.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 22:42:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/8196952#M101167</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-08-13T22:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/10698081#M101168</link>
      <description>&lt;P&gt;Hi , Thanks all for your comment in above post it help lot for me. I have below query please help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;I have prepared below for my requirement. In this, when user going to close the auto cad file by clicking on X right top corner of file it will give Auto cad message&amp;nbsp; to user for check point before closing. After check point window, command prompt use to show user about message for '' do you want to save the drawing" if Yes the drawing save and close and if press '' No'' then issue i am facing is, it will again ask &lt;STRONG&gt;" Really want to discard all changes to drawing? &amp;lt;N&amp;gt;" &lt;/STRONG&gt;After pressing "No" for changes in file, the file should close directly without asking again for my confirmation . I don't need this message please advice. below is my lisp,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;=======================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;(command "_.undefine" "_.close")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;(defun c:close nil&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;(setvar "cmdecho" 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;(alert (strcat "n1.check quantity in material list per customer PO" "\n2.Ensure the component voltage "))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;&amp;nbsp; (initget "Yes No")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;&amp;nbsp; (setq ans (getkword "\ndo you want to save drawing [Y/N]? "))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;&amp;nbsp; &amp;nbsp;(if (=and "Yes")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;&amp;nbsp; &amp;nbsp;(progn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;&amp;nbsp; &amp;nbsp; (vl-cmdf "_.qsave" "_.close" "_Yes")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;&amp;nbsp; &amp;nbsp;(command "_.close")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;(princ)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;===================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;Kindly Help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;Can I bring the same window (after my custom point check window) which is default setting in auto cad for drawing saving without having the message in command prompt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;Also suggest if i can add checkbox for the checkpoint i mentioned in Autocad message pop up, See attached?.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman',serif;"&gt;Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 11:02:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/10698081#M101168</guid>
      <dc:creator>sagar.adhau</dc:creator>
      <dc:date>2021-10-19T11:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/10699922#M101169</link>
      <description>&lt;P&gt;One item that was barely mentioned was NO and what would actually happen, yes its checked, so for me I would do something like (load "update revision") forcing the user to do just that in that lisp, this cancels the Close etc, how that is handled is up to your company std.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 options Doslib has a yesno dcl and same with my Multi radio buttons.lsp so user has a dcl rather than a Initget.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(if (not AH:Butts)(load "Multi Radio buttons.lsp"))
(if (= but nil)(setq but 1))
(setq ans (ah:butts but "h"  '("Yes or No" "Yes" "No"))) ; ans holds the button picked value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 02:10:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/10699922#M101169</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-10-20T02:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/10703673#M101170</link>
      <description>Hi, I have very basic knowledge of Lisp. Please mentioned where to add above code you have mentioned.</description>
      <pubDate>Thu, 21 Oct 2021 11:49:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/10703673#M101170</guid>
      <dc:creator>sagar.adhau</dc:creator>
      <dc:date>2021-10-21T11:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Prompt Message When Closing a Drawing</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/10705400#M101171</link>
      <description>&lt;P&gt;1 undefine&lt;/P&gt;&lt;P&gt;2 have you met the questions&lt;/P&gt;&lt;P&gt;3 yes close dwg or dont close&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your code has 2-3 problems&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(if (=and "Yes") ans is correct variable name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The yes no should be for the (alert (strcat "n1.check quantity in material list per customer PO" "\n2.Ensure the component voltage ")) not the close.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After if = yes do close remove second close so dwg will not close as you have said NO.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I will try to find time to write a dcl with the message re paragraph and the yes no.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 00:01:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/prompt-message-when-closing-a-drawing/m-p/10705400#M101171</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-10-22T00:01:25Z</dc:date>
    </item>
  </channel>
</rss>

