<?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: Clicking macros / VBA editor makes file dirty !? in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6270047#M331247</link>
    <description>&lt;P&gt;Our Add-ins don't run on save, they run when we run them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Add-in's are :-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Flat Pattern to DXF (sued for single sheet metal part files),&lt;/P&gt;
&lt;P&gt;Assembly to DXF (run from an assy to create all the DXF files of all the child Sheet Metal parts),&lt;/P&gt;
&lt;P&gt;And a few assy to excel files for all the bought &amp;amp; made items, the plasma cut (sheet metal) parts list and a 3rd spreadsheet for finish (paint, gal, etc...),&lt;/P&gt;
&lt;P&gt;An FG length update,&lt;/P&gt;
&lt;P&gt;A ground all routine (useful for when other CAD assy files are imported from a STEP and no constraints exist),&lt;/P&gt;
&lt;P&gt;A make all phantiom routine (used in conjunction with the above ground all).&lt;/P&gt;
&lt;P&gt;A few for the IDW environment also, just to speed up some mundane tasks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each of these get run when we want it to fire. And they all get run on released files, same as yours.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tested them all with various files and none of them create a dirty file. I also have a few iLogic routines that do create dirty files and are slowly replacing these with smarter and better written add-ins.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2016 06:19:15 GMT</pubDate>
    <dc:creator>brendan.henderson</dc:creator>
    <dc:date>2016-04-14T06:19:15Z</dc:date>
    <item>
      <title>Clicking macros / VBA editor makes file dirty !?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268153#M331240</link>
      <description>&lt;P&gt;Ok, so i have no idea where to go with this so i'm just posting it here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe others can confirm this behavior but here is what i'm seeing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If i open a part i can see by the Vault status that it is "clean" (no asterisk to show that there are changes)&lt;/P&gt;
&lt;P&gt;I then go to the "Tools" tab and hit "Macros"&lt;/P&gt;
&lt;P&gt;I don't do anything else, just hit Cancel in the dialog box.&lt;/P&gt;
&lt;P&gt;Then i refresh my Vault status and see an asterisk appearing...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an idea as to why this would happen, but i find it absolutely ridiculous that it does! &lt;img id="smileymad" class="emoticon emoticon-smileymad" src="https://forums.autodesk.com/i/smilies/16x16_smiley-mad.png" alt="Smiley Mad" title="Smiley Mad" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To elaborate on my example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a macro to create a dxf from a flat pattern.&lt;/P&gt;
&lt;P&gt;The macro is defined in the application project (default.ivb), so not in the document itself...&lt;/P&gt;
&lt;P&gt;(If anyone wants to recreate, just copy the code example from the programming help)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;When i have &lt;U&gt;the VBA editor open&lt;/U&gt;, start with a "clean" file and &lt;U&gt;run that macro from the VBA editor&lt;/U&gt; the file stays "clean" !&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If i start with the same "clean" file but &lt;U&gt;open the VBA editor by clicking the button&lt;/U&gt; and then running the same macro the file gets "dirty"...&lt;/P&gt;
&lt;P&gt;If i start with the same "clean" file and &lt;U&gt;hit the "macros" button&lt;/U&gt;, navigate to the macro and run it the file gets "dirty"...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also added the macro to the ribbon as a user command for easy access.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Running the macro with that button&lt;/U&gt; also makes the file get "dirty"...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is still in IV2016, but i don't expect it to be different in IV2017.&lt;/P&gt;
&lt;P&gt;I suspect the dirtying happens because Inventor loads the vba project into the active document, but if i run a macro from the application project through a user button on the ribbon i would expect to circumvent that...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sadly it doesn't and all this is leaving me rather frustrated.... &lt;img id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://forums.autodesk.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone have any suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:53:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268153#M331240</guid>
      <dc:creator>-niels-</dc:creator>
      <dc:date>2016-04-13T12:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Clicking macros / VBA editor makes file dirty !?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268462#M331241</link>
      <description>&lt;P&gt;I can confirm this behavior.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I think:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you click Macros or run some VBA, inventor will create an empty VBA project for each open document if there isn't one, which is why the file get dirty. The empty VBA project for each document will take up about 10KB disk space, you can easily find this by monitoring the file size after saving.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm afraid you can only live with that, I find no way to prevent inventor from creating these empty VBA projects. One thing you can do is, before running any VBA program, close all the other open documents, otherwise all files will get dirty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option, to circumvent this "dirty" problem, you can modify your template files: open all your template files, click the Macros button to make the empty VBA project created for each template, and then save them. This should eliminate the dirty flag when running VBA in the future, bad news is all your future documents will have this empty VBA project and take up 10KB more disk space.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 14:53:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268462#M331241</guid>
      <dc:creator>smilinger</dc:creator>
      <dc:date>2016-04-13T14:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Clicking macros / VBA editor makes file dirty !?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268486#M331242</link>
      <description>&lt;P&gt;Something you may be interested:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://modthemachine.typepad.com/my_weblog/2009/01/removing-vba-document-projects-from-inventor-files.html" target="_blank"&gt;Removing VBA Document Projects From Inventor Files&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 14:50:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268486#M331242</guid>
      <dc:creator>smilinger</dc:creator>
      <dc:date>2016-04-13T14:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Clicking macros / VBA editor makes file dirty !?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268504#M331243</link>
      <description>Thanks Smilinger, that sounds in line with my thoughts.&lt;BR /&gt;&lt;BR /&gt;The only weird thing is that it doesn't happen when you run a macro from an already activated VBA editor window.&lt;BR /&gt;At least that was what i noticed:&lt;BR /&gt;Open a part (clean), start vba editor, close the part (dirty), reopen the part (clean), switch to (still open) vba editor and run macro.&lt;BR /&gt;&lt;BR /&gt;So it is possible to run macros without dirtying the file, but in a very roundabout way...</description>
      <pubDate>Wed, 13 Apr 2016 14:56:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268504#M331243</guid>
      <dc:creator>-niels-</dc:creator>
      <dc:date>2016-04-13T14:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Clicking macros / VBA editor makes file dirty !?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268583#M331244</link>
      <description>&lt;P&gt;That's true, it can be easily observed that opening documents while VBA Editor is already opened will not create VBA projects. It's weird, looks like a bug.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 15:17:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6268583#M331244</guid>
      <dc:creator>smilinger</dc:creator>
      <dc:date>2016-04-13T15:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Clicking macros / VBA editor makes file dirty !?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6269867#M331245</link>
      <description>&lt;P&gt;I struggled with this for many years. Eventually I had all our macros written as Add-in's and this removed the problem entirely. It cost a few hundred dollars for the coder to do his work but it was well worth it.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 01:25:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6269867#M331245</guid>
      <dc:creator>brendan.henderson</dc:creator>
      <dc:date>2016-04-14T01:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Clicking macros / VBA editor makes file dirty !?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6270033#M331246</link>
      <description>Hah, you saying that really makes me feel the irony...&lt;BR /&gt;&lt;BR /&gt;I had the dxf code as part of our own custom addin, but since it only fires "on save" it doesn't work as well with our Vaulted files when they are "released", so i made the macro for those situations.&lt;BR /&gt;I actually turned it into iLogic code first, but adding those steps on top of the vault process would get a bit too much for my boss i think.&lt;BR /&gt;&lt;BR /&gt;I guess i will have to take the dive into rewriting our addin to get around this...&lt;BR /&gt;&lt;BR /&gt;Still doesn't take away the fact that the macro functionality is doing some seemingly unnecessary stuff though.</description>
      <pubDate>Thu, 14 Apr 2016 06:07:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6270033#M331246</guid>
      <dc:creator>-niels-</dc:creator>
      <dc:date>2016-04-14T06:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Clicking macros / VBA editor makes file dirty !?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6270047#M331247</link>
      <description>&lt;P&gt;Our Add-ins don't run on save, they run when we run them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Add-in's are :-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Flat Pattern to DXF (sued for single sheet metal part files),&lt;/P&gt;
&lt;P&gt;Assembly to DXF (run from an assy to create all the DXF files of all the child Sheet Metal parts),&lt;/P&gt;
&lt;P&gt;And a few assy to excel files for all the bought &amp;amp; made items, the plasma cut (sheet metal) parts list and a 3rd spreadsheet for finish (paint, gal, etc...),&lt;/P&gt;
&lt;P&gt;An FG length update,&lt;/P&gt;
&lt;P&gt;A ground all routine (useful for when other CAD assy files are imported from a STEP and no constraints exist),&lt;/P&gt;
&lt;P&gt;A make all phantiom routine (used in conjunction with the above ground all).&lt;/P&gt;
&lt;P&gt;A few for the IDW environment also, just to speed up some mundane tasks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each of these get run when we want it to fire. And they all get run on released files, same as yours.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tested them all with various files and none of them create a dirty file. I also have a few iLogic routines that do create dirty files and are slowly replacing these with smarter and better written add-ins.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 06:19:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6270047#M331247</guid>
      <dc:creator>brendan.henderson</dc:creator>
      <dc:date>2016-04-14T06:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Clicking macros / VBA editor makes file dirty !?</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6270064#M331248</link>
      <description>The "on save" bit is of my own doing, i wrote (read: copy/pasted together) our own addin quite some years ago and it always served us well.&lt;BR /&gt;At that time we didn't use Vault and i never anticipated this would be a problem.&lt;BR /&gt;There might be addins available that do basically the same, you already mention you have a flat pattern to DXF addin as well, but i made ours with some custom naming rules...&lt;BR /&gt;&lt;BR /&gt;Making it a macro had the benefit of adding it to the ribbon as a button, but the dirtying is a bit of a drawback.&lt;BR /&gt;&lt;BR /&gt;So, like i said, i'll just have to take the dive and rewrite our addin a bit.</description>
      <pubDate>Thu, 14 Apr 2016 06:39:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/clicking-macros-vba-editor-makes-file-dirty/m-p/6270064#M331248</guid>
      <dc:creator>-niels-</dc:creator>
      <dc:date>2016-04-14T06:39:41Z</dc:date>
    </item>
  </channel>
</rss>

