<?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: Memory Consumption Issue in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246944#M47844</link>
    <description>&lt;P&gt;Good. Then I am afraid there is little else one can suggest...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Sep 2018 14:38:15 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2018-09-05T14:38:15Z</dc:date>
    <item>
      <title>Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8243779#M47836</link>
      <description>&lt;P&gt;We are running an automated Revit instance against a model where many views are opened one after another and each time we perform read-only processing of the elements in each view. The problem is that memory continues to grow throughout the processing. Attached is an image of memory/cpu usage for a job that processed 61 views. We have added a call to Application.PurgeReleasedAPIObjects between processing each view, and made a call to View.Dispose() as well. However, memory continues to climb. What other steps can we take to prevent memory growth during processing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The test was with Revit 2015. The plot in the attached image includes 2nd y axis that shows the CPU usage. Memory series are using the 1st y axis.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 13:45:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8243779#M47836</guid>
      <dc:creator>darren.braynard2</dc:creator>
      <dc:date>2018-09-04T13:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8245569#M47837</link>
      <description>&lt;P&gt;Yes, well, Revit was designed to be used and driven by a human being through the end user interface. When you drive it programmatically like that, you must expect to hit a limit sometime.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check out these suggestions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2014/12/au-ends-and-batch-rendering-across-several-projects.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2014/12/au-ends-and-batch-rendering-across-several-projects.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2015/08/batch-processing-dwfx-links-and-future-proofing.html#4" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2015/08/batch-processing-dwfx-links-and-future-proofing.html#4&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck and have fun!&lt;/P&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 06:04:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8245569#M47837</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-09-05T06:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246571#M47838</link>
      <description>&lt;P&gt;I appreciate the response. These are great resources. Though, we are&amp;nbsp;hoping for a technique within the Revit API, since we are not in direct control of the Revit.exe process itself. If we could break up our job into smaller jobs, we could avoid the problem, but it would not be ideal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 12:58:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246571#M47838</guid>
      <dc:creator>darren.braynard2</dc:creator>
      <dc:date>2018-09-05T12:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246594#M47839</link>
      <description>&lt;P&gt;I cannot think of any other feasible approach. Sorry!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 13:04:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246594#M47839</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-09-05T13:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246736#M47840</link>
      <description>&lt;P&gt;I'm wondering, do you need to open the view to do read-only processing??&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 13:43:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246736#M47840</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-09-05T13:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246742#M47841</link>
      <description>&lt;P&gt;I believe so, the elements are processed according to which view(s) have them visible.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 13:46:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246742#M47841</guid>
      <dc:creator>darren.braynard2</dc:creator>
      <dc:date>2018-09-05T13:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246864#M47842</link>
      <description>&lt;P&gt;Very good question! You could try NOT to open any views at all... what do you need views for?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 14:18:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246864#M47842</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-09-05T14:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246884#M47843</link>
      <description>&lt;P&gt;We are using each View object in a call to&amp;nbsp;FilteredElementCollector in order to obtain its visible elements. We are not really "opening" the GUI view.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 14:24:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246884#M47843</guid>
      <dc:creator>darren.braynard2</dc:creator>
      <dc:date>2018-09-05T14:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246944#M47844</link>
      <description>&lt;P&gt;Good. Then I am afraid there is little else one can suggest...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 14:38:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246944#M47844</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-09-05T14:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246973#M47845</link>
      <description>&lt;P&gt;One final suggestion: where do you store the results of the read-only proces??&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 14:45:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8246973#M47845</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-09-05T14:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8247478#M47846</link>
      <description>&lt;P&gt;We send them out to an external database.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 17:10:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8247478#M47846</guid>
      <dc:creator>darren.braynard2</dc:creator>
      <dc:date>2018-09-05T17:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8256711#M47847</link>
      <description>&lt;P&gt;I see no pure API method to release memory. But by tapping into the UI, there is a possibility .&lt;/P&gt;&lt;P&gt;As an user I can release memory by opening the workset-dialog in a workshared project. This command has a CommandId and hence you can use PostCommand to show the dialog.&lt;/P&gt;&lt;P&gt;Using the dialogshowing event, you can then close the dialog and raise an external event to get control back.&lt;/P&gt;&lt;P&gt;This method isn't "pretty"( the dialog is visible for a split second ), but should work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;revit.Application.DialogBoxShowing += Application_DialogBoxShowing;
revit.Application.PostCommand("ID_SETTINGS_PARTITIONS");



void Application_DialogBoxShowing(object sender, Autodesk.Revit.UI.Events.DialogBoxShowingEventArgs e)
        {
            if (!e.DialogId.Equals("Dialog_Revit_Partitions")) return;
            UIApplication uiapp = sender as UIApplication;
            uiapp.DialogBoxShowing -= Application_DialogBoxShowing;
            // raise external event here to get control back
            e.OverrideResult(
               (int)TaskDialogResult.Close);
        }&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Sep 2018 11:16:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8256711#M47847</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-09-10T11:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Consumption Issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8256949#M47848</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2083518"&gt;@FAIR59&lt;/a&gt;. This sounds interesting. I will give it a try and report back my findings.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 12:51:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/memory-consumption-issue/m-p/8256949#M47848</guid>
      <dc:creator>darren.braynard2</dc:creator>
      <dc:date>2018-09-10T12:51:39Z</dc:date>
    </item>
  </channel>
</rss>

