<?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: Custom Plug in uninstalling itself in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885546#M82568</link>
    <description>&lt;P&gt;&amp;nbsp;I am manually installing them in the places required. I can't debug this as it's a project without an output type, so I'd have to somehow load it through one that does have an output type.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did find build events though it was actually under properties, so I assume that we might be running different versions of visual studio. There is nothing the post- build area, it is completely blank.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Mar 2018 20:21:51 GMT</pubDate>
    <dc:creator>Thomas.Long</dc:creator>
    <dc:date>2018-03-26T20:21:51Z</dc:date>
    <item>
      <title>Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7884932#M82560</link>
      <description>&lt;P&gt;I have a plug in that I've created to install an autosave feature as my group and myself seem to be having issues with crashes. It looks like it should work in its current rudimentary form, and it's appearing in the list of plug ins in Inventor. However, when I go in and double click to set it to the installed setting, once I close it the plug in automatically gets uninstalled (i.e. I'll go right back in and Inventor will say it is uninstalled in the plug in manager again. Can anybody tell me why this is happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Text;&lt;BR /&gt;using System.Threading.Tasks;&lt;BR /&gt;using System.Windows.Forms;&lt;BR /&gt;using FluentScheduler;&lt;BR /&gt;&lt;BR /&gt;namespace ClassLibrary2
{
    class Scheduler : Registry
    {
        private Autosave Autosave = new Autosave();

        public void Initialize()
        {
            JobManager.Initialize(new Scheduler());
        }

        public Scheduler()
        {
            Schedule(() =&amp;gt; Autosave.Run()).ToRunEvery(5).Minutes();
        }

        private void ListenForException()
        {
            JobManager.JobException += (info) =&amp;gt; MessageBox.Show(info.Exception.ToString());
        }

    }
}&lt;/PRE&gt;&lt;PRE&gt;using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Inventor;

namespace ClassLibrary2
{
    [Guid("140622f8-7de6-475e-babe-2161e61e0286")]
    public class StandardAddinServer : ApplicationAddInServer
    {
        private Autosave Autosave = new Autosave();
        private Scheduler Scheduler = new Scheduler();

        public dynamic Automation
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        #region ApplicationAddInServer Members
        //Called by Inventor when it loads the addin 
        public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firsttime)
        {
            Autosave.iApp = addInSiteObject.Application;
            Scheduler.Initialize();
        }


        //Releases objects on quitting and opens up garbage memory
        public void Deactivate()
        {
            Autosave.iApp = null;
            GC.Collect();
            GC.WaitForPendingFinalizers();
        }

        public void ExecuteCommand(int CommandID)
        {
            throw new NotImplementedException();
        }
        #endregion

    }
}&lt;/PRE&gt;&lt;PRE&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Inventor;

namespace ClassLibrary2
{
    class Autosave
    {
        public Application iApp { get; set; }

        public void Run ()
        {
            foreach (Inventor.Document iDoc in iApp.Documents.VisibleDocuments)
            {
                iDoc.Save();
            }
        }
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Thomas Long&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 17:13:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7884932#M82560</guid>
      <dc:creator>Thomas.Long</dc:creator>
      <dc:date>2018-03-26T17:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885018#M82562</link>
      <description>&lt;P&gt;I assume you are using VS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you debugging when this happens? If not are you using post-build to put the file where you want, or putting it there manually?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does your post-build look like? If you don't know how to get there and you are using VS - Right click on your project in the solution explorer &amp;gt; Build Events&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 17:37:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885018#M82562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-26T17:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885416#M82564</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Had the exact same problem a while back. For me it was caused by some error in the addin which I didnt spot because I wasn't debugging. I don't exactly remember what it was..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does it also happen when you are debugging, or do you get some error then?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 19:34:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885416#M82564</guid>
      <dc:creator>basnederveen</dc:creator>
      <dc:date>2018-03-26T19:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885546#M82568</link>
      <description>&lt;P&gt;&amp;nbsp;I am manually installing them in the places required. I can't debug this as it's a project without an output type, so I'd have to somehow load it through one that does have an output type.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did find build events though it was actually under properties, so I assume that we might be running different versions of visual studio. There is nothing the post- build area, it is completely blank.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 20:21:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885546#M82568</guid>
      <dc:creator>Thomas.Long</dc:creator>
      <dc:date>2018-03-26T20:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885558#M82571</link>
      <description>&lt;P&gt;I can't debug, it says that a project with an output type of class library cannot be run directly.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 20:22:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885558#M82571</guid>
      <dc:creator>Thomas.Long</dc:creator>
      <dc:date>2018-03-26T20:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885618#M82574</link>
      <description>You can debug it. I assume your using the inventor addin template from the sdk? You need to configure the debugging so it starts inventor.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-52422162-1784-4E8F-B495-CDB7BE9987AB" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-52422162-1784-4E8F-B495-CDB7BE9987AB&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This should describe how to configure ur VS. Im using 2017 and debugging class libraries alot..</description>
      <pubDate>Mon, 26 Mar 2018 20:46:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885618#M82574</guid>
      <dc:creator>basnederveen</dc:creator>
      <dc:date>2018-03-26T20:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885654#M82575</link>
      <description>&lt;P&gt;Sorry, you are correct. I forgot Properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Cliff's notes to setting up is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Debug, set "Start External Program" to Inventor.exe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure which version of VS you are using, but if VS2015, try adding the following to your Post Build events. It is essentially copying the pertinent files where you need them to go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;call "%VS140COMNTOOLS%vsvars32"
			mt.exe -manifest "$(ProjectDir)BodySketchTools.X.manifest" -outputresource:"$(TargetPath)";#2

		    xcopy /y "$(ProjectDir)Autodesk.$(TargetName).Inventor.addin" "$(ALLUSERSPROFILE)\Autodesk\Inventor Addins\"
                                         xcopy /y "$(TargetPath)" "$(ALLUSERSPROFILE)\Autodesk\Inventor Addins\"&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Mar 2018 20:58:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7885654#M82575</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-26T20:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7886785#M82598</link>
      <description>&lt;P&gt;I suspect that one of your references isn't getting copied locally when you perform a build; the most likely candidate is the "fluentscheduler" reference since everything else I can see is pretty "standard".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To fix this, select it in your references, go to the properties and set "Copy Local" to true.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that doesn't fix it, there are other things you can try, but I always find one thing at a time is the best approach when debugging this sort of thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 08:31:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7886785#M82598</guid>
      <dc:creator>AlexFielder</dc:creator>
      <dc:date>2018-03-27T08:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7889041#M82647</link>
      <description>&lt;P&gt;No I have not been using that. Looking at it, the example shown is apparently in visual basic so I will examine it closer and compare since my programming is in C#.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 21:10:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7889041#M82647</guid>
      <dc:creator>Thomas.Long</dc:creator>
      <dc:date>2018-03-27T21:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7889044#M82648</link>
      <description>&lt;P&gt;I double checked. Copy local was already set true.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 21:11:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7889044#M82648</guid>
      <dc:creator>Thomas.Long</dc:creator>
      <dc:date>2018-03-27T21:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7889056#M82650</link>
      <description>&lt;P&gt;I double checked it. Where did you get the name body sketch tools? That looks like it's adding in correctly, but it doesn't nothing remotely close to what my program was intended to do (I honestly don't even know what it was intended to do, so I was a tad nervous running it on any of our files). &amp;nbsp;Btw, I did get it to debug as everyone suggested&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 21:15:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7889056#M82650</guid>
      <dc:creator>Thomas.Long</dc:creator>
      <dc:date>2018-03-27T21:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7889069#M82651</link>
      <description>&lt;P&gt;You should be careful with autosaving though. There's a reason it's not included in alot of programs, if i would use autosave i think i would only use it for drawings or show some kind of timer. Maybe you can search it and find some old topics on this because I remember reading some quite negative reactions.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 21:22:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7889069#M82651</guid>
      <dc:creator>basnederveen</dc:creator>
      <dc:date>2018-03-27T21:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7890049#M82662</link>
      <description>&lt;P&gt;I would recommend installing this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"C:\Users\Public\Documents\Autodesk\Inventor 2018\SDK\developertools.msi"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as it will give you a c# &amp;amp; vb.net template that you can use to create a working solution inside of Visual Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Failing that, if you can share your current solution here that would help us to help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7B4B80143EBEB4F250CEEC82342F6CA1/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 08:35:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7890049#M82662</guid>
      <dc:creator>AlexFielder</dc:creator>
      <dc:date>2018-03-28T08:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7891695#M82680</link>
      <description>&lt;P&gt;I did read about some of the files, and I realize now that my code is a little too simplistic (I'll have to program it to wait until commands end before it undertakes the procedure, maybe see if there's a way to check if the program is busy at the moment, though technically fluent scheduler is actually supposed to queue its commands so that might work.)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That being said, I worked with solidworks in college and only began with inventor after I reached my workplace, so I know that autosave can be done with similar programs. Thankfully our crashing problems have died down from the days a year or so ago when you would have 2-3 inventor crashes a day, to maybe only once or twice a week. Other than the problem of it interrupting an important command, however, is there really any reason that it shouldn't have an autosave?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: Perhaps creating a backup file name called filename_backup and overwriting it every 5 minutes would be a better course of action if the objection is not wanting your file saved at certain points&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 17:15:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7891695#M82680</guid>
      <dc:creator>Thomas.Long</dc:creator>
      <dc:date>2018-03-28T17:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7891703#M82681</link>
      <description>&lt;P&gt;Here you go &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will look at the recommended installation a little more closely after work.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 17:17:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7891703#M82681</guid>
      <dc:creator>Thomas.Long</dc:creator>
      <dc:date>2018-03-28T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Plug in uninstalling itself</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7927370#M83166</link>
      <description>&lt;P&gt;I finally got around to looking at this and I noticed that in your .zip you didn't include the .addin file - was that intentional?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor will refuse to load the resultant .dll without it.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 10:15:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-plug-in-uninstalling-itself/m-p/7927370#M83166</guid>
      <dc:creator>AlexFielder</dc:creator>
      <dc:date>2018-04-12T10:15:22Z</dc:date>
    </item>
  </channel>
</rss>

