<?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 Using code to modify code in a DVB file : disable the Object Modified Event in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350012#M17823</link>
    <description>I remember reading about this before, but I can't seem to find it.&lt;BR /&gt;
&lt;BR /&gt;
I need to disable and then reenable the Object Modified Event.&lt;BR /&gt;
&lt;BR /&gt;
I want some code to change the event in the file so it won't fire when saving the file.  &lt;BR /&gt;
&lt;BR /&gt;
This is to prevent it from running a zillion times when I save a file. As every object is modified on save. &lt;BR /&gt;
&lt;BR /&gt;
I tried to unload the DVB file with another when save is run. However. When I run "Copy with Base Point".&lt;BR /&gt;
&lt;BR /&gt;
Save runs in the middle of the command and tried to unload the dvb file. and AutoCAD crashes. &lt;BR /&gt;
&lt;BR /&gt;
Any Help would be appreciated. Thanks.</description>
    <pubDate>Fri, 26 Sep 2008 00:40:30 GMT</pubDate>
    <dc:creator>arcticad</dc:creator>
    <dc:date>2008-09-26T00:40:30Z</dc:date>
    <item>
      <title>Using code to modify code in a DVB file : disable the Object Modified Event</title>
      <link>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350012#M17823</link>
      <description>I remember reading about this before, but I can't seem to find it.&lt;BR /&gt;
&lt;BR /&gt;
I need to disable and then reenable the Object Modified Event.&lt;BR /&gt;
&lt;BR /&gt;
I want some code to change the event in the file so it won't fire when saving the file.  &lt;BR /&gt;
&lt;BR /&gt;
This is to prevent it from running a zillion times when I save a file. As every object is modified on save. &lt;BR /&gt;
&lt;BR /&gt;
I tried to unload the DVB file with another when save is run. However. When I run "Copy with Base Point".&lt;BR /&gt;
&lt;BR /&gt;
Save runs in the middle of the command and tried to unload the dvb file. and AutoCAD crashes. &lt;BR /&gt;
&lt;BR /&gt;
Any Help would be appreciated. Thanks.</description>
      <pubDate>Fri, 26 Sep 2008 00:40:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350012#M17823</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2008-09-26T00:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using code to modify code in a DVB file : disable the Object Modified  Event</title>
      <link>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350013#M17824</link>
      <description>&lt;DIV id="jive-html-wrapper-div"&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;can you set a flag in beginsave and chek that in &lt;BR /&gt;
your object modified event?&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;hth&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;mark&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;&amp;lt;arcticad&amp;gt; wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:6039176@discussion.autodesk.com"&amp;gt;news:6039176@discussion.autodesk.com&lt;/A&gt;...&lt;/DIV&gt;I &lt;BR /&gt;
  remember reading about this before, but I can't seem to find it. I need to &lt;BR /&gt;
  disable and then reenable the Object Modified Event. I want some code to &lt;BR /&gt;
  change the event in the file so it won't fire when saving the file. This is to &lt;BR /&gt;
  prevent it from running a zillion times when I save a file. As every object is &lt;BR /&gt;
  modified on save. I tried to unload the DVB file with another when save is &lt;BR /&gt;
  run. However. When I run "Copy with Base Point". Save runs in the middle of &lt;BR /&gt;
  the command and tried to unload the dvb file. and AutoCAD crashes. Any Help &lt;BR /&gt;
  would be appreciated. Thanks.&lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Sep 2008 01:44:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350013#M17824</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-26T01:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using code to modify code in a DVB file : disable the Object Modified  Event</title>
      <link>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350014#M17825</link>
      <description>I've tried that. The Issues is that the Object Modified event is triggered for every object that is in the drawing and some drawing will take minutes to finish. The computer acts like it's crashed until it finishes. 

I tried to use one file to unload the other on BeginSave. This is fine when I actually want to save the file. But AutoDesk in it's infinite wisdom has decided to save the file in the middle of the command. 

The sequence as I see it. 
{code:java}

copybase &lt;ENTER&gt;
pick base point
select objects &lt;ENTER&gt;
BeginSave event is triggered.
DVB tries to unload the other DVB file. 
*crash*

{code}if i unload the file while AutoCAD is in the command then I get an exception error and it crashes. I'm getting lots of crashes as a result.&lt;/ENTER&gt;&lt;/ENTER&gt;</description>
      <pubDate>Fri, 26 Sep 2008 06:15:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350014#M17825</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2008-09-26T06:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using code to modify code in a DVB file : disable the Object Modified  Event</title>
      <link>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350015#M17826</link>
      <description>How about disabling the autosave at the beginning of the routine, and re-enabling it at the end?</description>
      <pubDate>Fri, 26 Sep 2008 09:52:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350015#M17826</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-26T09:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using code to modify code in a DVB file : disable the Object Modified  Event</title>
      <link>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350016#M17827</link>
      <description>I disabled AutoSave in the options dialog box. and it didn't seem to help. Also I  suspect that it's doing it in other commands, as I am still getting random crashes. Which doesn't happen when I'm not unloading the file. &lt;BR /&gt;
&lt;BR /&gt;
Where should I be setting it? &lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Fri, 26 Sep 2008 14:47:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350016#M17827</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2008-09-26T14:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using code to modify code in a DVB file : disable the Object Modified  Event</title>
      <link>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350017#M17828</link>
      <description>I've tracked down the issue to the dvb file itself. it I create a new file and unload it. Then it doesn't have the issue. it will unload just fine. &lt;BR /&gt;
&lt;BR /&gt;
setting "Savetime" 0 didn't help. &lt;BR /&gt;
&lt;BR /&gt;
However does anyone know how to modify the code in the dvb with another code.. I'd still like to know. &lt;BR /&gt;
&lt;BR /&gt;
Thank You.</description>
      <pubDate>Fri, 26 Sep 2008 15:39:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350017#M17828</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2008-09-26T15:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using code to modify code in a DVB file : disable the Object Modified  Event</title>
      <link>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350018#M17829</link>
      <description>Tanzillo, Tony &lt;BR /&gt;
&lt;BR /&gt;
Posted this. &lt;BR /&gt;
&lt;BR /&gt;
http://discussion.autodesk.com/forums/thread.jspa?threadID=103581&lt;BR /&gt;
&lt;BR /&gt;
The only solution I can see in VBA is to intercept&lt;BR /&gt;
BeginSave, and then disconnect the object that's&lt;BR /&gt;
sinking the ObjectModified event, and the reconnect&lt;BR /&gt;
it in EndSave.&lt;BR /&gt;
&lt;BR /&gt;
I can't seem to get this to work. &lt;BR /&gt;
&lt;BR /&gt;
if I  Set ACADApp = GetObject(, "AutoCAD.Application.17")&lt;BR /&gt;
&lt;BR /&gt;
then I try to use &lt;BR /&gt;
&lt;BR /&gt;
Private Sub ACADAPP_ObjectModified(ByVal Object As Object)&lt;BR /&gt;
&lt;BR /&gt;
nothing works. &lt;BR /&gt;
&lt;BR /&gt;
I'm Missing something ....</description>
      <pubDate>Fri, 26 Sep 2008 16:49:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/using-code-to-modify-code-in-a-dvb-file-disable-the-object/m-p/2350018#M17829</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2008-09-26T16:49:23Z</dc:date>
    </item>
  </channel>
</rss>

