<?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: Run new Inventor application with selected addins in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9053182#M101647</link>
    <description>&lt;P&gt;After opening X amount of docs and converting them to autocad DWG, memory runs full and inventor crashes.&lt;/P&gt;&lt;P&gt;In Inventor &amp;lt; 2011 you had a green bar in lower left corner for that. The bar is gone, problem still there.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2019 15:33:03 GMT</pubDate>
    <dc:creator>Cadkunde.nl</dc:creator>
    <dc:date>2019-09-27T15:33:03Z</dc:date>
    <item>
      <title>Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9052538#M101634</link>
      <description>&lt;P&gt;I have a script that creates Autocad DWG exports of all drawings in an assembly.&lt;/P&gt;&lt;P&gt;I close and open a new Inventor instance after a set number of drawings.&lt;/P&gt;&lt;P&gt;However, this gives a lot of delay in the process.&lt;/P&gt;&lt;P&gt;Sometimes Inventor crashes after making just 10 drawings, so some engineers set the tool to open and close after 5 drawings.&lt;/P&gt;&lt;P&gt;With 100+ drawings in an assembly, this gives a lot of extra time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor apprentice is not suitable for dwg export.&lt;/P&gt;&lt;P&gt;Is there a way to start up Inventor super light, without loading any addins, except the one for dwg export?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other tips are welcome too,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Arnold&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 12:13:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9052538#M101634</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-09-27T12:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9052900#M101642</link>
      <description>&lt;P&gt;Hello Arnold,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why does new Inventor process create?&lt;/P&gt;&lt;P&gt;(Is there a reason that current Inventor process cannot be used?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does remote Inventor process restart at every 5 (or 10) documents are opened?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3133719"&gt;@Cadkunde.nl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Sometimes Inventor crashes after making just 10 drawings, so some engineers set the tool to open and close after 5 drawings.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Try keeping new Inventor window invisible. In my case, sometimes Inventor had crashed when remote Inventor window was visible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;Freeradical&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hideo Yamada&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 13:58:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9052900#M101642</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2019-09-27T13:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9053182#M101647</link>
      <description>&lt;P&gt;After opening X amount of docs and converting them to autocad DWG, memory runs full and inventor crashes.&lt;/P&gt;&lt;P&gt;In Inventor &amp;lt; 2011 you had a green bar in lower left corner for that. The bar is gone, problem still there.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 15:33:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9053182#M101647</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-09-27T15:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9054149#M101652</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why don't you Open, Save As and Close one by one? Of cource, the remote process must be reused.&lt;/P&gt;&lt;P&gt;My macro (that works in local) do so and has no trouble with dozens of documents.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;Freeradical&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hideo Yamada&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2019 03:14:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9054149#M101652</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2019-09-28T03:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9054275#M101654</link>
      <description>&lt;P&gt;Is your macro creating 100 autocad dwg's of very large lay-outs (&amp;gt; 10.000 components) ?&lt;/P&gt;&lt;P&gt;My other (lighter) script can open dozens of drawings without crashing too&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know what happens during creation of dwg, but it consumes a lot of memory&lt;/P&gt;&lt;P&gt;Inventor keeps lots of stuff in memory and there is no way to flush it unless you restart client.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please no more replies about necessity of inventor restart, unless you know how to flush its memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to improve the speed inventor starts,&amp;nbsp; my first thought is loading only the DWG addin and no other addin.&lt;/P&gt;&lt;P&gt;Any sample script or advise how to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2019 08:12:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9054275#M101654</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-09-28T08:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9054300#M101655</link>
      <description>&lt;P&gt;Oh btw, overlooked your tip on running invisible. I'm doing that. thx.&lt;/P&gt;&lt;P&gt;Tips to run it faster are appreciated. But its the inventor client that runs out of mem, not script.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2019 08:49:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9054300#M101655</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-09-28T08:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9054325#M101657</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3133719"&gt;@Cadkunde.nl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Oh btw, overlooked your tip on running invisible. I'm doing that. thx.&lt;/P&gt;&lt;P&gt;Tips to run it faster are appreciated. But its the inventor client that runs out of mem, not script.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Sometimes Inventor crashes when it is visible and operated from outside.&lt;/P&gt;&lt;P&gt;(The effect of running invisible has less effect on speed.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the crash doesn't occur when you operate same things manually, the problem is not caused by memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What version of Inventor are you using?&lt;/P&gt;&lt;P&gt;As you said, older version must be restarted after opening large assy, but I don't care in last few versions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If booting time is still a problem and the operation doesn't save any docs, I recommend that prepare new remote Inventor process during the other remote Inventor is processing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;Freeradical&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hideo Yamada&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2019 09:30:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9054325#M101657</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2019-09-28T09:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9055427#M101676</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor seems to read the files in the following directory to determine which Add-In to load or not.&lt;/P&gt;&lt;P&gt;C:\Users\&amp;lt;User Name&amp;gt;\AppData\Roaming\Autodesk\Inventor 2020\Addins&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And Inventor looks like accessing to this directory only when it's booting or using AddIn Manager.&lt;/P&gt;&lt;P&gt;You can rename the directory 'Addins' to another even if Inventor is running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you prepare the configuration set which loads minimum add-ins, you can switch the configuration to it before booting remote Inventor by renaming the name of 'Addins' directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep mind that this technique is tricky and there is a risk of unexpected problems.&lt;/P&gt;&lt;P&gt;However, I think it is worth trying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;Freeradical&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hideo Yamada&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2019 13:59:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9055427#M101676</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2019-09-29T13:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9055635#M101680</link>
      <description>&lt;P&gt;you could try to unload all addins by code. something like this:&lt;/P&gt;&lt;PRE&gt;foreach (ApplicationAddIn addin in inventorApp.ApplicationAddIns)
            {
                addin .Deactivate();
                addin .LoadAutomatically = false;
                addin .StartUpEnabled = false;
            }&lt;/PRE&gt;</description>
      <pubDate>Sun, 29 Sep 2019 18:08:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9055635#M101680</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2019-09-29T18:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9059009#M101737</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/555733"&gt;@HideoYamada&lt;/a&gt;The application is already running invisible. Inventor crashes when too much in memory. Try make a program that opens a large number of inventor drawings and export them to autocad dwg's that does not crash if you don't believe me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My program is run within Inventor as an Addin. AFAIK that is all single threaded so the process waits till Inventor is started. Though I'm not sure I can already start another Inventor Application in another thread, or how to program that is then picked up in the main thread. If that would be possible, that would be awesome&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 09:13:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9059009#M101737</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-10-01T09:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9059060#M101738</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;Thanks, but this will unload addins for the current inventor application, not for a new instance before addins are loaded, correct? Also I think I need to close the current inventor to save these new settings before opening new application?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could save and store all addin settings for the user, and return them when script is finished. Still I find it too risky and tedious to add to my program. If anything goes wrong: I get calls of users with no addins.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping to be able to respond to an event much like Inventor.ApplicationEvents and skip loading the addin if the name is not equal to ....&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 09:41:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9059060#M101738</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-10-01T09:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9059822#M101747</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3133719"&gt;@Cadkunde.nl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;The application is already running invisible. Inventor crashes when too much in memory. Try make a program that opens a large number of inventor drawings and export them to autocad dwg's&lt;/P&gt;&lt;P&gt;that does not crash if you don't believe me.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I made and run this VBA macro which saves the files in "&amp;lt;WorkSpace&amp;gt;\IDW" as AutoCAD dwg, and got the 241 dwg files (77MB) in about 30 minuits.&lt;/P&gt;&lt;P&gt;The largest assembly consists of 1,031 files and 10,518 occurrences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Option Explicit

Sub test()
    Dim idwDirctoryPath As String
    Dim idwFilename As String
    Dim idwFullPath As String
    Dim oDrawingDoc As DrawingDocument
    
    idwDirctoryPath = ThisApplication.DesignProjectManager.ActiveDesignProject.WorkspacePath &amp;amp; "\IDW\"
    Debug.Print idwDirctoryPath
    
    Debug.Print "START : " &amp;amp; Now()
    
    idwFilename = Dir(idwDirctoryPath &amp;amp; "*.idw")
    Do While idwFilename &amp;lt;&amp;gt; ""
        idwFullPath = idwDirctoryPath &amp;amp; idwFilename
        Debug.Print idwFullPath
        
        Set oDrawingDoc = ThisApplication.Documents.Open(idwFullPath)
        oDrawingDoc.SaveAs Left(idwFullPath, Len(idwFullPath) - 3) &amp;amp; "dwg", True
        oDrawingDoc.Dirty = False
        ThisApplication.SilentOperation = True
        oDrawingDoc.Close
        ThisApplication.SilentOperation = False
        idwFilename = Dir()
    Loop
    
    Debug.Print "END : " &amp;amp; Now()
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;======&lt;/P&gt;&lt;P&gt;Freeradical&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hideo Yamada&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 14:09:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9059822#M101747</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2019-10-01T14:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9060039#M101756</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3133719"&gt;@Cadkunde.nl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;My program is run within Inventor as an Addin. AFAIK that is all single threaded so the process waits till Inventor is started. Though I'm not sure I can already start another Inventor Application in another thread, or how to program that is then picked up in the main thread. If that would be possible, that would be awesome&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Run the Inventor in another thread. If you are using .net language (e.g. VB.net), it is easy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do this with VBA, some technique are required.&lt;/P&gt;&lt;P&gt;1) Master process uses VB script to run the Inventor in another thread and start the macro which saves dwg files.&lt;/P&gt;&lt;PRE&gt;' VB script sample&lt;BR /&gt;Dim oInvApp
Set oInvApp = CreateObject("Inventor.Application")
oInvApp.Visible = True
oInvApp.VBAProjects(1).InventorVBAComponents("Module1").InventorVBAMembers("YourMacroName").Execute&lt;/PRE&gt;&lt;P&gt;2) Communication between the master(host) and slave(remote) is done via file.&lt;/P&gt;&lt;P&gt;Master writes list of idws to one text file, and create the lock file.&lt;/P&gt;&lt;P&gt;Slave(VBA macro which executed by VB script) waits creation of lock file, and then reads list file, delete lock file, save dwg files in the list, finally terminate Inventor.&lt;/P&gt;&lt;P&gt;3) If master needs to know that slave is alive or not,&amp;nbsp; slave can tell it by another lock file which is created when the macro starts and deleted before ThisApplication.Quit().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;Freeradical&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hideo Yamada&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 15:22:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9060039#M101756</guid>
      <dc:creator>HideoYamada</dc:creator>
      <dc:date>2019-10-01T15:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9060212#M101761</link>
      <description>&lt;P&gt;Preset all addins to Demand Load.&amp;nbsp; Won't load until something needs it too.&amp;nbsp; Much of Inventor startup time is not the add-in's anyway.&lt;/P&gt;&lt;P&gt;Can you run multiple Inventors, yes, if you start them via your code.&amp;nbsp; I have a VB.Net exe that does NOT run as an Inventor Add-IN it uses this to get Inventor:&lt;/P&gt;&lt;PRE&gt;    Public Function GetInventorApplication() As Inventor.Application
        If invApp Is Nothing Then
            If invAppCollection IsNot Nothing Then
                If invAppCollection.Count &amp;gt; 0 Then
                    For i As Integer = invAppCollection.Count - 1 To 0 Step -1
                        If invAppCollection(i) IsNot Nothing Then
                            invApp = invAppCollection(i)
                            Exit For
                        Else
                            invAppCollection.RemoveAt(i)
                        End If
                    Next
                End If
            End If
            Try
                invApp = Marshal.GetActiveObject("Inventor.Application
            Catch ex As Exception
                Try
                    Dim invAppType As Type = GetTypeFromProgID("Inventor.Application")
                    invApp = CreateInstance(invAppType)
                    invApp.Visible = True
                    'counter the app
                    Dim counter As Integer = 0
                    Do While invApp.Ready = False
                        counter += 1
                        Debug.Print(counter)
                        If counter &amp;gt; 1000 Then
                            Exit Do
                        End If
                    Loop
                    For Each addIn As ApplicationAddIn In invApp.ApplicationAddIns
                        Try
                            If addIn.LoadBehavior = AddInLoadBehaviorEnum.kLoadImmediately Then
                                addIn.Activate()
                            End If
                        Catch exAddIn As Exception
                            'skip it
                        End Try
                    Next
                    invAppWasStarted = True
                Catch ex2 As Exception
                    MsgBox("Unable to get or start Inventor" &amp;amp; vbCr &amp;amp; ex2.ToString, MsgBoxStyle.SystemModal)
                End Try
            End Try
        End If
        Try
            Dim dcountTest As Integer = invApp.Documents.Count
        Catch ex As Exception
            invApp = Nothing
            GetInventorApplication()
        End Try
        Return invAp&lt;/PRE&gt;&lt;P&gt;You can use the application collection to separate which Inventor is doing what that way.&amp;nbsp; Note my code did not Add the new inventor to the collection, you will need to do that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some random thoughts:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unless your running a KickA machine running multiple Inventor's may not be a good idea.&amp;nbsp; I would also like to add another point, if Inventor keeps crashing, your documents may need to be Migrated with Total Rebuild to update their versions to the latest versions.&amp;nbsp; Inventor can, but does not like running multiple version assembly files, and tends to get stupid.&amp;nbsp; Closing all documents should allow inventor time to purge its memory sponge, but I agree it still tends to leak memory (if not hemorrhage).&amp;nbsp; The Task scheduler puts a clock on the inventor applications and attempts retry 3 times.&amp;nbsp; It also performs a max file count before closing Inventor and starting a new one.&amp;nbsp; I've experimented with this.&amp;nbsp; All is well unless you get Vault involved.&amp;nbsp; Finally, Inventor handles System.Threading.Tasks.Parallel.For, meaning you can get it to run multiple tasks on multiple threads at once.&amp;nbsp; This is good when using tasks that look up lists, and such, not so good when adding to the database (use SyncLock or die!)&amp;nbsp; So you may be able to have multiple documents process at once if you code it right.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 16:33:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9060212#M101761</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2019-10-01T16:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062412#M101787</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3677112"&gt;@JamieVJohnson2&lt;/a&gt;Thanks for your example but I already have a script that restarts Inventor after processing ## amount of drawings, it works.&lt;/P&gt;&lt;P&gt;The thing is that it's slow, I want to speed it up the restart of Inventor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When set to load on demand, many addins still load when i reopen the assembly and drawing environment. Like frame generator, because its in the ribbon of assembly. I thought blocking loading of 90% of addins might speed up things even if it's only 5 seconds, it might be 2 minutes on the whole process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advise how to speed up the Inventor reboots is welcome&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 14:24:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062412#M101787</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-10-02T14:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062436#M101788</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/555733"&gt;@HideoYamada&lt;/a&gt;Congratulations, your script saves an inventor idw to an inventor dwg that your autocad can open too.&lt;/P&gt;&lt;P&gt;I will not explain all differences between an Autocad DWG Export and whatever it is you are doing. Please stop posting about this. It's completely not relevant to this topic&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 14:33:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062436#M101788</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-10-02T14:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062459#M101789</link>
      <description>&lt;P&gt;What about overlapping the processes.&amp;nbsp; Does your PC have enough power to run multiple Inventor's simultaneously.&amp;nbsp; If so, consider making a program that starts an Inventor while the other thread set is processing a batch, say batch is at 80%, open new inventor, batch is at 100% close old inventor, and switch to new one.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 14:40:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062459#M101789</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2019-10-02T14:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062521#M101790</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/555733"&gt;@HideoYamada&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3677112"&gt;@JamieVJohnson2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My script is not an executable nor is it made with the VBA editor.&lt;/P&gt;&lt;P&gt;Its an add-in that operates in this single thread environment of Inventor and any attempt to make a new thread results in a crash.&lt;/P&gt;&lt;P&gt;I could perhaps somehow call a external executable which operates outside current process that can run an inventor process in each thread. No idea yet how, and I wouldn't call it simple at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping for an easy way to block addins and boost restarts sufficiently.&lt;/P&gt;&lt;P&gt;Will take some time before I start exploring this path. Thanks for all tips&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 15:10:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062521#M101790</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-10-02T15:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062630#M101792</link>
      <description>&lt;P&gt;So if your running from inside inventor as an add-in then this must happen before you code even gets a chance to load:&lt;/P&gt;&lt;P&gt;Inventor startup, Inventor add-in load.&amp;nbsp; You can't stop those processes with your add-in level coding.&amp;nbsp; You can tell the most all of add-ins to NOT LOAD by user settings, then have the add-in manually load all the add-ins that are supposed to be there.&lt;/P&gt;&lt;P&gt;Being an add-in locked into a single (apartment) inside of a single instance of Inventor, you are limited to multi-tasking options, I get it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can make a standalone exe using VB.Net and WPF window (if only 1 button to activate), that then runs all your code.&amp;nbsp; This compared to your existing add-in should be easy by changing your VS project from class library to application with the Application tab of your project properties (Application type dropdown).&amp;nbsp; This would require you to designate a main window as a startup window.&amp;nbsp; (project templates create MainWindow.xaml, but you can use any window file).&amp;nbsp; IMO it is easer to use a standalone exe than the add-in because it tends to be version independent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other option would be to have a simple exe app call your existing add-in, after managing the inventor startup/cleanup process from outside of inventor.&amp;nbsp; I can't help but to think you are reinventing the task scheduler that inventor comes with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 15:42:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9062630#M101792</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2019-10-02T15:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Run new Inventor application with selected addins</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9063111#M101810</link>
      <description>&lt;P&gt;I have a button for engineers to one-click publish all drawings of the assembly they work in to Print/PDF/DXF/STEP/Acad DWG in a 'PRODUCTION' folder for them to zip and mail.&lt;/P&gt;&lt;P&gt;Yes that can be done with task scheduler, but this is one click from assembly they got opened in front of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor client crashes when asked too many files or actions.&lt;/P&gt;&lt;P&gt;So for that I made an restart client option, but I don't like the speed.&lt;/P&gt;&lt;P&gt;Thats where i am now, most roads from here are a bit tedious...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 18:35:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/run-new-inventor-application-with-selected-addins/m-p/9063111#M101810</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2019-10-02T18:35:17Z</dc:date>
    </item>
  </channel>
</rss>

