<?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 Set DataStorage Entity from external application in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/set-datastorage-entity-from-external-application/m-p/13085263#M2507</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Exploring options to create DataStorage and set entity in Revit document from external application. After setting&amp;nbsp;DataStorage entity need to save document. This need to be done running Revit instance in background.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently could create storage and update entity in Add-In. But this need executed from separate exe.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The question is,&amp;nbsp;&lt;SPAN&gt;How to start Revit instance from exe and access Revit API to update document storage entity.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2024 11:23:08 GMT</pubDate>
    <dc:creator>prakash.muthu</dc:creator>
    <dc:date>2024-10-15T11:23:08Z</dc:date>
    <item>
      <title>Set DataStorage Entity from external application</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-datastorage-entity-from-external-application/m-p/13085263#M2507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Exploring options to create DataStorage and set entity in Revit document from external application. After setting&amp;nbsp;DataStorage entity need to save document. This need to be done running Revit instance in background.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently could create storage and update entity in Add-In. But this need executed from separate exe.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The question is,&amp;nbsp;&lt;SPAN&gt;How to start Revit instance from exe and access Revit API to update document storage entity.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 11:23:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-datastorage-entity-from-external-application/m-p/13085263#M2507</guid>
      <dc:creator>prakash.muthu</dc:creator>
      <dc:date>2024-10-15T11:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set DataStorage Entity from external application</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-datastorage-entity-from-external-application/m-p/13085475#M2508</link>
      <description>&lt;P&gt;You can start Revit from an external EXE using&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;Process.Start&lt;/STRONG&gt;&lt;/U&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://duckduckgo.com/?q=process.start&amp;amp;ia=web" target="_blank"&gt;https://duckduckgo.com/?q=process.start&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;to create DataStorage, set entity in Revit document and save document&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;All of these steps require a &lt;U&gt;&lt;STRONG&gt;valid Revit API context&lt;/STRONG&gt;&lt;/U&gt;. One way to obtain that is to use an &lt;STRONG&gt;&lt;U&gt;external event&lt;/U&gt;&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 13:03:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-datastorage-entity-from-external-application/m-p/13085475#M2508</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-10-15T13:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set DataStorage Entity from external application</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-datastorage-entity-from-external-application/m-p/13085517#M2509</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7772490"&gt;@prakash.muthu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a workaround for your task, Kindly check the below points.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Implement your Extensible storage helper methods in a static class.&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Design a simple standalone application (exe) that starts Revit in a separate process.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;static void Main(string[] args)
{
    string exeLocation = @"C:\Program Files\Autodesk\Revit 2023\Revit.exe";
    string arguments = @"/languageENG /runhidden /nosplash";

    ProcessStartInfo revitInfo= new ProcessStartInfo(exeLocation,arguments);
    Process.Start(revitInfo);
}​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;In the OnStartup method your application implements, subscribe to ApplicationInitialized event.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;When your add-in receives the event, open the document you want to add data storage by calling the helper methods.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;When the document is opened, perform the process; output whatever you need to output.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Save and Close the document.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Exit the ApplicationInitialized event handler&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;When the standalone application receives the inter-process message from your add-in, kill the Revit process.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Hope this will Helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 13:23:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-datastorage-entity-from-external-application/m-p/13085517#M2509</guid>
      <dc:creator>Mohamed_Arshad</dc:creator>
      <dc:date>2024-10-15T13:23:27Z</dc:date>
    </item>
  </channel>
</rss>

