<?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: Self updating AddIn in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10774079#M106499</link>
    <description>&lt;P&gt;Please do share some code. Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 16:24:46 GMT</pubDate>
    <dc:creator>pball</dc:creator>
    <dc:date>2021-11-22T16:24:46Z</dc:date>
    <item>
      <title>Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6586617#M106483</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made an AddIn that is actively used at my company. And by actively I mean by the users and the developer (me), so there are frequent updates for the AddIn holding new features and bug fixes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently when a new version goes live, a Email is sent to ALL of the end-users that they need to run the installer to get the latest .dll file on their computer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To avoid that someone forgets or ignores the email I would like to compare the AddIn .dll files the local one stored under&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;C:\Program Files\Autodesk\Inventor 2014\Bin&lt;/PRE&gt;
&lt;P&gt;And the one on the network drive ( or maybe in the future, on the FTP server ). I did some research and found a way to do this check.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim myFileVersionInfo As FileVersionInfo
myFileVersionInfo = FileVersionInfo.GetVersionInfo("C:\Program Files\Autodesk\Inventor 2014\Bin\xxxx.dll")

Dim serverFileVersionInfo As FileVersionInfo
serverFileVersionInfo = FileVersionInfo.GetVersionInfo("T:\Inventor\Tools\xxxxx\xxxxx.dll")

Debug.Print(String.Compare(myFileVersionInfo.ProductVersion, serverFileVersionInfo.ProductVersion))&lt;/PRE&gt;
&lt;P&gt;When this result = -1 the local file is out of date and the .dll file should be replaced. Problem is.. When Inventor is running the .dll file cannot be replaced. How should I handle this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My check is currently situated in the activate sub&lt;/P&gt;
&lt;PRE&gt;        Public Sub Activate(ByVal addInSiteObject As Inventor.ApplicationAddInSite, ByVal firstTime As Boolean) Implements Inventor.ApplicationAddInServer.Activate

            ' This method is called by Inventor when it loads the AddIn.
            ' The AddInSiteObject provides access to the Inventor Application object.
            ' The FirstTime flag indicates if the AddIn is loaded for the first time.

            ' Initialize AddIn members.
            m_inventorApplication = addInSiteObject.Application
            
            ' Check for the file
            FileVersionCheck()

        End Sub&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Sep 2016 11:44:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6586617#M106483</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2016-09-27T11:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6586804#M106484</link>
      <description>I'll be keeping an eye out on this topic since I'd implement this also.&lt;BR /&gt;&lt;BR /&gt;The only way I can see being able to update an addin is to have it install/copy the update after Inventor closes. It should be possible to hook an event when Inventor is closing, check that no other instances of Inventor are open, and then create something that would persist after Inventor closes that does the updating. I'm not sure how a secondary process would be created except for having a helper program that would be ran.&lt;BR /&gt;&lt;BR /&gt;Thinking about it I did have a script create a batch file that would be run when the script exited and the batch file would then do something and then start the script again and finally delete itself. That seems a bit janky for an addin though. Perhaps there is a better programming method for something like that.</description>
      <pubDate>Tue, 27 Sep 2016 12:56:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6586804#M106484</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-09-27T12:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6586905#M106485</link>
      <description>&lt;P&gt;Maybe this will not work but what if...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;        Public Sub Activate(ByVal addInSiteObject As Inventor.ApplicationAddInSite, ByVal firstTime As Boolean) Implements Inventor.ApplicationAddInServer.Activate

            ' This method is called by Inventor when it loads the AddIn.
            ' The AddInSiteObject provides access to the Inventor Application object.
            ' The FirstTime flag indicates if the AddIn is loaded for the first time.

            ' Initialize AddIn members.
            m_inventorApplication = addInSiteObject.Application
            
            ' Check for the file
            If FileVersionCheck = -1 Then

                 ' Quit Inventor
                 m_inventorApplication.Quit

                 ' Replace the .dll file with new version
 
                 '  Start a new process                
                 Process.Start("C:\Program Files\Autodesk\Inventor 2014\Bin\Inventor.exe)

                 '  Kill the current addin from memory
                 me.dispose


            End If

        End Sub&lt;/PRE&gt;
&lt;P&gt;This is untested and a longshot maybe, I don't know what happens with the AddIn process when Inventor Quits. Does the process get terminated???&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 13:28:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6586905#M106485</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2016-09-27T13:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6586975#M106486</link>
      <description>&lt;P&gt;I have sporadicly about 50 users , i place the dll on the server, and close the sessions of that file on the server, update the dll (fast, fast, fast, ...) and no one even noticed anything. No installers needed, the addin is installed with the package we deliver.&lt;/P&gt;
&lt;P&gt;I do the same for Autocad.&lt;/P&gt;
&lt;P&gt;Everyone is up to date without informing, mailing and so on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 13:52:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6586975#M106486</guid>
      <dc:creator>frederic.vandenplas</dc:creator>
      <dc:date>2016-09-27T13:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587051#M106487</link>
      <description>&lt;P&gt;How do you point your Inventor for a .dll outside of the Inventor BIN folder?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:17:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587051#M106487</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2016-09-27T14:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587071#M106488</link>
      <description>&lt;PRE&gt;&amp;lt;Addin Type="Standard"&amp;gt;
  &amp;lt;!--Created for Autodesk Inventor Version 19.0--&amp;gt;
  &amp;lt;ClassId&amp;gt;{55adb922-404a-441f-a3c1-0154b7b8c2ce}&amp;lt;/ClassId&amp;gt;
  &amp;lt;ClientId&amp;gt;{55adb922-404a-441f-a3c1-0154b7b8c2ce}&amp;lt;/ClientId&amp;gt;
  &amp;lt;DisplayName&amp;gt;XXX&amp;lt;/DisplayName&amp;gt;
  &amp;lt;Description&amp;gt;XXX&amp;lt;/Description&amp;gt;
  &amp;lt;Assembly&amp;gt;serverpath\name.dll&amp;lt;/Assembly&amp;gt;
  &amp;lt;LoadOnStartUp&amp;gt;1&amp;lt;/LoadOnStartUp&amp;gt;
  &amp;lt;UserUnloadable&amp;gt;0&amp;lt;/UserUnloadable&amp;gt;
  &amp;lt;Hidden&amp;gt;0&amp;lt;/Hidden&amp;gt;
  &amp;lt;SupportedSoftwareVersionGreaterThan&amp;gt;17..&amp;lt;/SupportedSoftwareVersionGreaterThan&amp;gt;
  &amp;lt;DataVersion&amp;gt;1&amp;lt;/DataVersion&amp;gt;
  &amp;lt;UserInterfaceVersion&amp;gt;1&amp;lt;/UserInterfaceVersion&amp;gt;
&amp;lt;/Addi&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:23:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587071#M106488</guid>
      <dc:creator>frederic.vandenplas</dc:creator>
      <dc:date>2016-09-27T14:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587093#M106489</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3139519"&gt;@Jef_E﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I'm fairly certain when you exit Inventor any addin will be terminated because the addin should be a child of Inventor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/828704"&gt;@frederic.vandenplas﻿&lt;/a&gt;&lt;BR /&gt;&lt;STRIKE&gt;Could you please elaborate some more. You say you replace the dll on the network, do you have Inventor using the dll off the network? I didn't really follow what you were saying.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Never mind got to posting a bit late apparently. Really wish the forum would warn you if there were new posts since the time you started to write a reply.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:31:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587093#M106489</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-09-27T14:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587119#M106490</link>
      <description>&lt;P&gt;Sorry for that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we make a package of our software, which will later be deployed in another package (this is basically a script which copies heritage fonts, settings, but also the .addin file to the Inventor Addins folder which is located in&amp;nbsp;C:\ProgramData\Autodesk\Inventor Addins)&lt;/P&gt;
&lt;P&gt;This is easy, if a user needs another version of the software, the dll is also available.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the .addin file i point to the dll which is on the server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If i need to update the dll, i could stay until everyone has gone home, or in the other case, i log on on the server and go to the session manager where i can kill all the clients who are using the dll&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://technet.microsoft.com/en-us/library/cc725689(v=ws.11).aspx" target="_blank"&gt;https://technet.microsoft.com/en-us/library/cc725689(v=ws.11).aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I prefer not to do the 2nd option but it works anyway (never, ever heard a complaint)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in fact i don't even install the dll, which is the best part of the registry free addin functionality with inventor or autocad&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this is clear, if other questions, just ask &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 14:36:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587119#M106490</guid>
      <dc:creator>frederic.vandenplas</dc:creator>
      <dc:date>2016-09-27T14:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587851#M106491</link>
      <description>&lt;P&gt;I did some more searching and the best way I've come across to auto update something is using an external updater program. Below is how I would try to go about it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have your addin check if there is a new version available.&lt;/P&gt;&lt;P&gt;Prompt user that there is a new update, either let them choose to update or tell them Inventor will be closed.&lt;/P&gt;&lt;P&gt;Have the addin save the updater.exe from its resources and start the updater.exe&lt;/P&gt;&lt;P&gt;Have the addin close Inventor&lt;/P&gt;&lt;P&gt;The updater.exe would wait until Inventor is closed, if there are multiple Inventors open it might have to ask you to close them&lt;/P&gt;&lt;P&gt;When no Inventors are open the updater.exe can copy the updated dll/addin file&lt;/P&gt;&lt;P&gt;The updater.exe can then start Inventor and close&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This method would require making an updater.exe that would copy the updated file(s) after Inventor is closed and then restarting Inventor. It should be possible to add this exe file as a resource to the addin, that way nothing extra needs to be distributed. It would also be possible to update the updater.exe in future versions of the addin and replace any existing one when updating again.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 19:44:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6587851#M106491</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2016-09-27T19:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6602578#M106492</link>
      <description>&lt;P&gt;There is another simple way to update the add-in automatically.&lt;/P&gt;&lt;P&gt;I have an add-in (master-dll) that is automatic loaded when Inventor starts. The only thing this dll does is to load other dll-files (work-dll's)&lt;/P&gt;&lt;P&gt;The trick is that before the work-dll-files are loaded the master-dll checks if the version of the work-dll on the server is newer and download and overwrite it with the old dll on the users pc&amp;nbsp;(C:\ProgramData\...)&lt;/P&gt;&lt;P&gt;It works fine if you make often updates to your programs, but if you want to add a complete new function that needs a&amp;nbsp;new&amp;nbsp;button on the Inventor ribbon then you have to update the master-dll.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 11:59:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/6602578#M106492</guid>
      <dc:creator>w.pepping</dc:creator>
      <dc:date>2016-10-05T11:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/8324518#M106493</link>
      <description>&lt;P&gt;Hi Wim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your approach looks like it would be perfect for&amp;nbsp;use in&amp;nbsp;company solutions with regular updates. But I can't get it to work. What I've done is install the work-dll's like normal, but&amp;nbsp;I prevent the work-dll's to load automatically. In my master-dll I tried to&amp;nbsp;load the work-dll's by using the activate() method of the corrosponding&amp;nbsp;work-dll GUID, is this the correct way to load the work-dll?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I tried this activate() method on two work-dll's these dll's get loaded but other add-in's (for&amp;nbsp;example: the content center add-in) will not get loaded. When I load these work-dll's with automatically load like normal the other add-in's also load normal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some difference between my approach and yours is that I use the master-dll only to check and replace the versions of the work-dll's. All other commands and ribbon buttons&amp;nbsp;are in the work-dll's. Could this be a problem?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 10:56:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/8324518#M106493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-10T10:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/8324543#M106494</link>
      <description>&lt;P&gt;I used a .exe that is set as start-up program. This .exe replaces the files each time a boot is performed. Close enough for me.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 11:04:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/8324543#M106494</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2018-10-10T11:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/8324750#M106495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do similar:&lt;/P&gt;&lt;P&gt;I create a *.bat file and write a script to copy file from XXXXX on the server, to YYYYY in the dll location folder of inventor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this bat file I place in the startup folder of our workstations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on every startup the file that is newer is copied...&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 12:32:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/8324750#M106495</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-10-10T12:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/8325080#M106496</link>
      <description>&lt;P&gt;Hey&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We all have different approaches. My method is to have a text file residing on my web server that i update (generates when i compile my app) that has the current version. When my app loads, it checks the url and reads the version then compares it with the current version. If the url version is greater, i provide the option to download and install it which invokes a download then closes the current app.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 14:26:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/8325080#M106496</guid>
      <dc:creator>NachoShaw</dc:creator>
      <dc:date>2018-10-10T14:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/9602833#M106497</link>
      <description>&lt;P&gt;....my 100+ workstations run a StartUP script that replaces the addin elements locally reading them from a network share properly prepared. I do not need any third-party tool (it's done natively by ROBOCOPY) and it has never given a problem in the last 9 years.&lt;BR /&gt;(oh, sorry: I noticed too late that another user has already given this suggestion two posts earlier, but I am not able to delete my post)&lt;/P&gt;&lt;P&gt;Maybe it helps&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 05:00:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/9602833#M106497</guid>
      <dc:creator>freesbee</dc:creator>
      <dc:date>2020-06-26T05:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10774042#M106498</link>
      <description>&lt;P&gt;I found a way to do this by making a separate addin to acquire the DLL from a server location and using system.reflection to create a new instance of the other library and loading it after its copied. Using this method I'm able to update the DLL on the server and the other DLL copies it to the workstations and runs it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I can provide code if anyone's interested.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 16:12:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10774042#M106498</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-22T16:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10774079#M106499</link>
      <description>&lt;P&gt;Please do share some code. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 16:24:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10774079#M106499</guid>
      <dc:creator>pball</dc:creator>
      <dc:date>2021-11-22T16:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10774435#M106500</link>
      <description>&lt;P&gt;You can actually take advantage of how Inventor loads add-ins to do this quite easily. As with Bolter99's reply you need a second add-in to manage this. The key is to assign a 'lower' value to the 'GuidAttribute' attribute of this management add-in. This attribute is defined just above the declaration of the addin class in the 'AddInServer' file.&amp;nbsp; Note that the following are not complete, you may require other attributes. This same GUID is included in the .addin file that enables registry free registration of your addin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C#&lt;/STRONG&gt;: [GuidAttribute("&amp;lt;your guid goes here&amp;gt;")]&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public class StandardAddInServer: ApplicationAddInServer&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VB.NET&lt;/STRONG&gt;: &amp;lt;GuidAttribute("&amp;lt;your guid goes here&amp;gt;")&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Public Class StandardAddInServer&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Implements Inventor.ApplicationAddInServer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor loads add-ins in order by their GUID. If the management add-in has a lower value (hex value), it will initialize first. In the Activate method for the class, call a routine to copy the newer version of your add-in over the existing one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You do have to be very careful about handling any errors and maintaining the existing version of your add-in if anything goes wrong in the process. I've used this technique since 2012 and it works really well.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 19:00:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10774435#M106500</guid>
      <dc:creator>nmunro</dc:creator>
      <dc:date>2021-11-22T19:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10781240#M106501</link>
      <description>&lt;P&gt;Heres the code I used to load the DLL:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Imports System.Reflection  

Sub LoadLibraries()
            'This is where the "Updates" will be loaded.
            For Each Library As FileInfo In New DirectoryInfo(My.Settings.Libraries).GetFiles("*.dll", SearchOption.TopDirectoryOnly)
                Try
                    Dim newPath As String = IO.Path.Combine(My.Application.Info.DirectoryPath, Library.Name)
                    Try
                        IO.File.Copy(Library.FullName, newPath, True)
                    Catch ex As Exception
                        'Likely 2nd instance of Inventor.
                    End Try

                    'Load it!
                    oAssembly = Assembly.LoadFrom(newPath)
                    'We get the type of the application (Class_Root_Namespace.Name_Class)
                    oType = oAssembly.GetType("Class_Root_Namespace.Name_Class")
                    'We create an type instance
                    oObject = Activator.CreateInstance(oType)
                    'We execute the methode Hello
                    'oObject.ThisApplication = g_inventorApplication  'call a command from the class1
                    oObject.Activate(addInSiteObj, True)

                    'If TypeOf oObject.ThisApplication Is Inventor.Application Then
                    '    Dim tests As Inventor.Application = CType(oObject.ThisApplication, Inventor.Application)
                    '    MsgBox(tests.SoftwareVersion.DisplayName)
                    'End If
                Catch ex As Exception

                End Try
            Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then put the LoadAssemblies sub into the Activate sub.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 10:04:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10781240#M106501</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-25T10:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Self updating AddIn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10813149#M106502</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/35568"&gt;@nmunro&lt;/a&gt;&amp;nbsp;Can you possibly expand further on the guid 'lower value' determines the load order. I tried this myself as I have 2 addins loading and would like to have them load in order. I copied the guid number from the addin I wanted to laod second, pasted it into the the other addin and in the last hex number sequence reduced the number by approx 40 (decimal). I then updated all references in that addin to point to the new guid. End result was the addins still load in the same order (addin 2 then addin 1). I checked this by adding message boxes in the standardaddinserver.activate.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 23:04:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/self-updating-addin/m-p/10813149#M106502</guid>
      <dc:creator>Slothian</dc:creator>
      <dc:date>2021-12-09T23:04:37Z</dc:date>
    </item>
  </channel>
</rss>

