<?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: Revit 2020 temp path changes every session in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8767401#M42743</link>
    <description>&lt;P&gt;As a poet once said referring to more unfortunate circumstances:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Ours is not to wonder why,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Ours is but to do or die.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, I don't know why, and I don't think it will help you or anyone else to know either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The real question is how to handle the modified behaviour, isn't it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2019 15:53:53 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2019-05-02T15:53:53Z</dc:date>
    <item>
      <title>Revit 2020 temp path changes every session</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8759058#M42740</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In our add-in for Revit we are using the temp path, which can be requested using Path.GetTempPath() in C#.&lt;/P&gt;
&lt;P&gt;When this is requested in pre 2020 version, this returned the %TMP% environment variable path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since Revit 2020 the requested temp path contains an additional guid at the end of the path, which changes after every restart of Revit(ie. C:\Users\USERNAME\AppData\Local\Temp\84ae8c0d-197b-4b44-b8d3-8823fabbba4f). It seems like Revit changes the temp path for the scope of the application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course we can remove the guid from the path in our add-in, but I'm wondering if this has been done by purpose or could be a bug?&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;Niels&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revit version:&amp;nbsp;20.0.0.377 20190327_2315(x64)&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 09:53:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8759058#M42740</guid>
      <dc:creator>n.vroegindeweij</dc:creator>
      <dc:date>2019-04-29T09:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2020 temp path changes every session</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8759272#M42741</link>
      <description>&lt;P&gt;Dear Niels,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, it is definitely not a bug, because no intended behaviour has ever been explicitly declared for this, afaik.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, it may still cause a problem for you, depending on your specific needs and how you make use of it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest that you use the operating system TMP variable instead of the current Revit.exe temporary path, if that suits your needs better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can gladly ask the development team (a) what caused this change, (b) why and (c) whether this is intentional.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They may not be able or willing to provide an answer, though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll let you know what they say as soon as I hear back from them.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 11:46:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8759272#M42741</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-04-29T11:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2020 temp path changes every session</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8767209#M42742</link>
      <description>&lt;P&gt;Hello all.&lt;/P&gt;
&lt;P&gt;I also have the same problem, and want to know, what is the reason of it? Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 14:54:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8767209#M42742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-02T14:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2020 temp path changes every session</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8767401#M42743</link>
      <description>&lt;P&gt;As a poet once said referring to more unfortunate circumstances:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Ours is not to wonder why,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Ours is but to do or die.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, I don't know why, and I don't think it will help you or anyone else to know either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The real question is how to handle the modified behaviour, isn't it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 15:53:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8767401#M42743</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-05-02T15:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2020 temp path changes every session</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8768589#M42744</link>
      <description>&lt;P&gt;To get the original user temp path, below method can be used. And to have similar behavior as Path.GetTempPath(), it might be good to use TEMP, USERPROFILE, WinDir as fallback variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Environment.GetEnvironmentVariable("TMP", EnvironmentVariableTarget.User);&lt;/PRE&gt;
&lt;P&gt;Probably from technical point of view there is nothing wrong with the change of temp path on application level. However, I think it can cause unexpected behavior for a lot add-ins(ie caching in temp, suddenly doesn't work).&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 05:54:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/8768589#M42744</guid>
      <dc:creator>n.vroegindeweij</dc:creator>
      <dc:date>2019-05-03T05:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2020 temp path changes every session</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/11248328#M42745</link>
      <description>&lt;P&gt;Have any explain why Autodesk do that ?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 10:40:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/11248328#M42745</guid>
      <dc:creator>Chuong.Ho</dc:creator>
      <dc:date>2022-06-21T10:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2020 temp path changes every session</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/11248357#M42746</link>
      <description>&lt;P&gt;I'm sorry I have no explanation. I can only refer to my answer above to&amp;nbsp;&lt;A class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2550519" target="_self"&gt;&lt;SPAN class=""&gt;nikita_bokhan&lt;/SPAN&gt;&lt;/A&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 10:58:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/m-p/11248357#M42746</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-06-21T10:58:29Z</dc:date>
    </item>
  </channel>
</rss>

