<?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 Load Revit plugin on Legacy Revit versions in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12707458#M5909</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Revit plugin with 2 commands that are intended to run on Revit 2019 onward.&lt;/P&gt;&lt;P&gt;I am now working on the 3rd command, which is using the OST_Signage BuiltInCategory. &lt;STRONG&gt;This category is only available from Revit 2022 API.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How can I still load this whole plugin (with 3 commands) also to Revit 2019 so that the 3rd command will not be functional?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 14 Apr 2024 10:40:16 GMT</pubDate>
    <dc:creator>mizrachi_amir2</dc:creator>
    <dc:date>2024-04-14T10:40:16Z</dc:date>
    <item>
      <title>Load Revit plugin on Legacy Revit versions</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12707458#M5909</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Revit plugin with 2 commands that are intended to run on Revit 2019 onward.&lt;/P&gt;&lt;P&gt;I am now working on the 3rd command, which is using the OST_Signage BuiltInCategory. &lt;STRONG&gt;This category is only available from Revit 2022 API.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How can I still load this whole plugin (with 3 commands) also to Revit 2019 so that the 3rd command will not be functional?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 10:40:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12707458#M5909</guid>
      <dc:creator>mizrachi_amir2</dc:creator>
      <dc:date>2024-04-14T10:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Load Revit plugin on Legacy Revit versions</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12707604#M5910</link>
      <description>&lt;P&gt;So - whoever tackles the same, I managed to overcome this using the preprocessor directives:&lt;/P&gt;&lt;P&gt;#if --&amp;gt; #else --&amp;gt; #endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also added this to my .csproj:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;DefineConstants&amp;gt;$(DefineConstants);RV$(RevitVersion)&amp;lt;/DefineConstants&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what guided me:&lt;/P&gt;&lt;P&gt;&lt;A href="https://levelup.gitconnected.com/multi-year-revit-addin-a-better-way-54ef441b5b4b" target="_blank"&gt;https://levelup.gitconnected.com/multi-year-revit-addin-a-better-way-54ef441b5b4b&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 13:28:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12707604#M5910</guid>
      <dc:creator>mizrachi_amir2</dc:creator>
      <dc:date>2024-04-14T13:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Load Revit plugin on Legacy Revit versions</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12707664#M5911</link>
      <description>&lt;P&gt;The approach in the article above suggests creating one project, per Revit version. This is bad advice, and I don't recommend it. With Define Constants, you can support all versions of the Revit API in a single project&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Recommendations:&lt;/P&gt;&lt;P&gt;Revit Multiversion support wiki -&amp;nbsp;&lt;A href="https://github.com/Nice3point/RevitTemplates/wiki/Multiple-Revit-Versions" target="_blank" rel="noopener"&gt; https://github.com/Nice3point/RevitTemplates/wiki/Multiple-Revit-Versions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Auto Define constants generation - &lt;A href="https://github.com/Nice3point/Revit.Build.Tasks" target="_blank" rel="noopener"&gt;https://github.com/Nice3point/Revit.Build.Tasks&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 21:01:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12707664#M5911</guid>
      <dc:creator>nice3point</dc:creator>
      <dc:date>2024-04-14T21:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Load Revit plugin on Legacy Revit versions</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12707720#M5912</link>
      <description>&lt;P&gt;Thank you, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4158637"&gt;@nice3point&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;Actually, I used your templates so I have a single project for all versions &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 15:29:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12707720#M5912</guid>
      <dc:creator>mizrachi_amir2</dc:creator>
      <dc:date>2024-04-14T15:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Load Revit plugin on Legacy Revit versions</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12708030#M5913</link>
      <description>&lt;P&gt;perfect) then I have good news for you, you don't need to add DefineConstants yourself. They are already contained in the templates&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nice3point_0-1713128243117.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1349623i65BAB0A75E61D1C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nice3point_0-1713128243117.png" alt="nice3point_0-1713128243117.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In your case, the only thing left to do is to wrap the code in a #if block:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;#if REVIT2022_OR_GREATER
    var category = BuiltInCategory.OST_Signage;
#endif&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 14 Apr 2024 20:59:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12708030#M5913</guid>
      <dc:creator>nice3point</dc:creator>
      <dc:date>2024-04-14T20:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Load Revit plugin on Legacy Revit versions</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12710417#M5914</link>
      <description>That is just great. Thank you very much!</description>
      <pubDate>Mon, 15 Apr 2024 20:25:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/load-revit-plugin-on-legacy-revit-versions/m-p/12710417#M5914</guid>
      <dc:creator>mizrachi_amir2</dc:creator>
      <dc:date>2024-04-15T20:25:26Z</dc:date>
    </item>
  </channel>
</rss>

