<?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 Rename Revit Document in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9826338#M30866</link>
    <description>&lt;P&gt;Hi y'all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say that the user has a Revit Document open in my Application, but he/she has named it incorrectly (or better said, not accordingly to our internal naming convention).&lt;/P&gt;&lt;P&gt;Now, I'm creating a plugin that generates the correct name and path from some user inputs (through a UI) and I want to change the name of the Document on the fly, to the generated name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;string generatedName = GenerateName();
uiApp.ActiveUIDocument.Document.Title = generatedName;&lt;/LI-CODE&gt;&lt;P&gt;but then I found out that the property&amp;nbsp;&lt;EM&gt;Title&lt;/EM&gt; doesn't have a&amp;nbsp;&lt;EM&gt;get&amp;nbsp;&lt;/EM&gt;accessor, hence I can't do the above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best way to achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 27 Oct 2020 06:03:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-10-27T06:03:18Z</dc:date>
    <item>
      <title>Rename Revit Document</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9826338#M30866</link>
      <description>&lt;P&gt;Hi y'all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say that the user has a Revit Document open in my Application, but he/she has named it incorrectly (or better said, not accordingly to our internal naming convention).&lt;/P&gt;&lt;P&gt;Now, I'm creating a plugin that generates the correct name and path from some user inputs (through a UI) and I want to change the name of the Document on the fly, to the generated name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;string generatedName = GenerateName();
uiApp.ActiveUIDocument.Document.Title = generatedName;&lt;/LI-CODE&gt;&lt;P&gt;but then I found out that the property&amp;nbsp;&lt;EM&gt;Title&lt;/EM&gt; doesn't have a&amp;nbsp;&lt;EM&gt;get&amp;nbsp;&lt;/EM&gt;accessor, hence I can't do the above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best way to achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 06:03:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9826338#M30866</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-27T06:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Revit Document</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9826968#M30867</link>
      <description>&lt;P&gt;Do you mean &lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/U&gt;et accessor&lt;/EM&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The title is associated with the file name, isn't it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you have to close the model, rename the file, and reopen the model from the newly named file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 11:49:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9826968#M30867</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-10-27T11:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Revit Document</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9828532#M30868</link>
      <description>&lt;P&gt;Yeah sorry I meant&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;set&lt;/STRONG&gt; &lt;/EM&gt;accessor!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And yes, the title is pretty much the file name without the&amp;nbsp;&lt;EM&gt;.rvt&lt;/EM&gt; extension.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On closing an renaming the file: I guess I wouldn't be able to do it probrammatically from a Revit button / IExternalEvent (triggered by a Dockable Panel), would I?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 22:33:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9828532#M30868</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-27T22:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Revit Document</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9828610#M30869</link>
      <description>&lt;P&gt;In the UI if I wanted to rename a file I wouldn't close it and rename it I'd SaveAs and delete the old one...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Document.SaveAS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should also consider if you are working with the central file or the local file?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 23:29:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9828610#M30869</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-10-27T23:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Revit Document</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9829031#M30870</link>
      <description>&lt;P&gt;I like Richard's suggestion better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, you can close the active document if you really want to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2012/12/closing-the-active-document.html" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2012/12/closing-the-active-document.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 06:54:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9829031#M30870</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-10-28T06:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Revit Document</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9829050#M30871</link>
      <description>&lt;P&gt;Yeah I thought of the SaveAs option too. I guess it's the best option.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks guys!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 07:14:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/rename-revit-document/m-p/9829050#M30871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-28T07:14:05Z</dc:date>
    </item>
  </channel>
</rss>

