<?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: Check if user has done something after opening a drawing. in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766865#M4008</link>
    <description>&lt;P&gt;Thank you! I didn't think there would be a solution. That's great.&lt;/P&gt;</description>
    <pubDate>Sat, 11 May 2024 17:34:34 GMT</pubDate>
    <dc:creator>SRSDS</dc:creator>
    <dc:date>2024-05-11T17:34:34Z</dc:date>
    <item>
      <title>Check if user has done something after opening a drawing.</title>
      <link>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766433#M4004</link>
      <description>&lt;P&gt;I would like a to know if the user has done something has occurred after a drawing has been opened.&lt;/P&gt;&lt;P&gt;I can't figure out a location to store a boolean variable that:&lt;/P&gt;&lt;P&gt;Does not modify the document's database. If the database is modified on opening the drawing thinks it needs saving.&lt;/P&gt;&lt;P&gt;Is affected by the undo command, which Document.UserData isn't.&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 09:29:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766433#M4004</guid>
      <dc:creator>SRSDS</dc:creator>
      <dc:date>2024-05-11T09:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Check if user has done something after opening a drawing.</title>
      <link>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766669#M4005</link>
      <description>&lt;P&gt;You may want to check the system variable "DBMod":&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="normanyuan_0-1715435536560.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1360832iEC5C2F556B8BF6AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="normanyuan_0-1715435536560.png" alt="normanyuan_0-1715435536560.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can also call Document.PopDbmod()/PushDbmod() to arbitrarily set the drawing modification status, if necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this documentation on these 2 methods (it is for AutoLisp, but the remark/code sample are straightforward to follow):&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-1B34A525-A881-42A8-BD07-865CA685F33B" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-1B34A525-A881-42A8-BD07-865CA685F33B&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 13:58:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766669#M4005</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2024-05-11T13:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Check if user has done something after opening a drawing.</title>
      <link>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766691#M4006</link>
      <description>&lt;P&gt;Hi Normal,&lt;/P&gt;&lt;P&gt;I was aware of the DBMOD system variable but never thought to try and change it.&lt;/P&gt;&lt;P&gt;I've just tried these which don't seem to work. That would be brilliant if I could achieve it.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;        Application.DocumentManager.MdiActiveDocument.PopDbmod()
        Application.DocumentManager.MdiActiveDocument.PushDbmod()
        Application.SetSystemVariable("DBMOD", 0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 14:15:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766691#M4006</guid>
      <dc:creator>SRSDS</dc:creator>
      <dc:date>2024-05-11T14:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Check if user has done something after opening a drawing.</title>
      <link>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766730#M4007</link>
      <description>&lt;P&gt;If you read the LISP code sample referred in the link provided in my previous reply, you should realize the correct way to use PushDbmod()/PopDbmod() method:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You call PushDbmod() first, which is equivalent to save the DBMOD value; then you can go ahead to do your work with the drawing, which might result in the DBMOD value change accordingly; then you call PopDbmo() to remove the changed DBMO value caused by your code and restore the value when PushDbmod() is called.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, you would use code like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var dwg=.....MdiActiveDocument;&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; dwg.PushDbmod();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;DoMyWorkToChangeThingsInDwg(dwg);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;finally&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; dwg.PopDbmod();&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 14:56:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766730#M4007</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2024-05-11T14:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Check if user has done something after opening a drawing.</title>
      <link>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766865#M4008</link>
      <description>&lt;P&gt;Thank you! I didn't think there would be a solution. That's great.&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 17:34:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/check-if-user-has-done-something-after-opening-a-drawing/m-p/12766865#M4008</guid>
      <dc:creator>SRSDS</dc:creator>
      <dc:date>2024-05-11T17:34:34Z</dc:date>
    </item>
  </channel>
</rss>

