<?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: As running plug-in only from Revit 2014 in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/as-running-plug-in-only-from-revit-2014/m-p/5207787#M76055</link>
    <description>&lt;P&gt;Sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/jeremytammik/AdnRme" target="_blank"&gt;https://github.com/jeremytammik/AdnRme&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More specifically, at the external application implementation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/jeremytammik/AdnRme/blob/master/AdnRme/App.cs" target="_blank"&gt;https://github.com/jeremytammik/AdnRme/blob/master/AdnRme/App.cs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the OnStartup method:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;  public Result OnStartup( UIControlledApplication a )
  {
    // only create a new ribbon panel in Revit MEP:

    ProductType pt = a.ControlledApplication.Product;

    //if( ProductType.MEP == pt ) // 2012

    if( ProductType.MEP == pt 
      || ProductType.Revit == pt ) // 2013
    {
      AddRibbonPanel( a );
      return Result.Succeeded;
    }
    return Result.Cancelled;
  }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
    <pubDate>Mon, 11 Aug 2014 20:20:54 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2014-08-11T20:20:54Z</dc:date>
    <item>
      <title>As running plug-in only from Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/as-running-plug-in-only-from-revit-2014/m-p/5204525#M76052</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;I developed a plug-in for Revit 2014 using&amp;nbsp;Visual Studio .NET 2012. this plug-in runs in revit 2014 without problems.the installer saves &amp;nbsp;the plug-in components in the folder "Program Files\My_Plugin\" and copy two files (.dll and .addin) to the path&amp;nbsp;..... appdata\roaming\autodesk\revit\addin\2014\. If I copy the files from the path "&lt;SPAN&gt;appdata\roaming\autodesk\revit\addin\2014\" to the folder&amp;nbsp;&lt;/SPAN&gt;2013, my plugin runs without problems in Revit 2013.&amp;nbsp;As running my plug-in only from Revit 2014?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 19:39:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/as-running-plug-in-only-from-revit-2014/m-p/5204525#M76052</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-08T19:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: As running plug-in only from Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/as-running-plug-in-only-from-revit-2014/m-p/5205825#M76053</link>
      <description>&lt;P&gt;Dear Marcos Mateo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, the end of your message seems garbled to me. Can you please clarify what you mean?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or rather, maybe I can guess: do you wish your add-in to run only in Revit 2014, and be disabled in all other versions of Revit?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That can be easily achieved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simply implement an external application and check the Revit version in the OnStartup method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are not happy with it, you can cancel the loading operation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Sun, 10 Aug 2014 20:17:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/as-running-plug-in-only-from-revit-2014/m-p/5205825#M76053</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-08-10T20:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: As running plug-in only from Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/as-running-plug-in-only-from-revit-2014/m-p/5207159#M76054</link>
      <description>&lt;P&gt;Hi jeremy&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks, that is what I need. There is an example in Visual Basic NET 2012 to do this?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2014 16:12:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/as-running-plug-in-only-from-revit-2014/m-p/5207159#M76054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-11T16:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: As running plug-in only from Revit 2014</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/as-running-plug-in-only-from-revit-2014/m-p/5207787#M76055</link>
      <description>&lt;P&gt;Sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/jeremytammik/AdnRme" target="_blank"&gt;https://github.com/jeremytammik/AdnRme&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More specifically, at the external application implementation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/jeremytammik/AdnRme/blob/master/AdnRme/App.cs" target="_blank"&gt;https://github.com/jeremytammik/AdnRme/blob/master/AdnRme/App.cs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the OnStartup method:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;  public Result OnStartup( UIControlledApplication a )
  {
    // only create a new ribbon panel in Revit MEP:

    ProductType pt = a.ControlledApplication.Product;

    //if( ProductType.MEP == pt ) // 2012

    if( ProductType.MEP == pt 
      || ProductType.Revit == pt ) // 2013
    {
      AddRibbonPanel( a );
      return Result.Succeeded;
    }
    return Result.Cancelled;
  }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2014 20:20:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/as-running-plug-in-only-from-revit-2014/m-p/5207787#M76055</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-08-11T20:20:54Z</dc:date>
    </item>
  </channel>
</rss>

