<?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 2024 - Constantly getting managed exception with OpenAndActivateDocument in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13823707#M84730</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4391054"&gt;@hzamani&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://autodesk.slack.com/archives/C0SR6NAP8/p1758703735461559" target="_blank" rel="noopener"&gt;A suggestion from Engineering team&lt;/A&gt;: Could you try using "Save As" instead of "Close and Save" to clear the transmittal status and mark the model as a new central?&lt;/P&gt;</description>
    <pubDate>Wed, 24 Sep 2025 13:24:21 GMT</pubDate>
    <dc:creator>naveen.kumar.t</dc:creator>
    <dc:date>2025-09-24T13:24:21Z</dc:date>
    <item>
      <title>Revit 2024 - Constantly getting managed exception with OpenAndActivateDocument</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13820140#M84712</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting&amp;nbsp; Autodesk.Revit.Exceptions.InternalException: A managed exception was thrown by Revit &lt;SPAN&gt;or&lt;/SPAN&gt; by one of its external applications, how ever I call the&amp;nbsp;OpenAndActivateDocument.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried multiple models, stand-alone or workshared. I also have tried different overloads eg passing model path as string with&amp;nbsp;OpenAndActivateDocument(path) or&amp;nbsp;OpenAndActivateDocument(modelPath, options, bool) - none of these work. This is just in Revit 2024. Any version before that is working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any suggestions what could be the issue here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 07:06:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13820140#M84712</guid>
      <dc:creator>hzamani</dc:creator>
      <dc:date>2025-09-22T07:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2024 - Constantly getting managed exception with OpenAndActivateDocument</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13820191#M84714</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4391054"&gt;@hzamani&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="65" data-end="228"&gt;Could you please confirm if you are able to open the same models manually in Revit 2024 via the Revit UI without any issues?&lt;BR data-start="189" data-end="192" /&gt;Is this issue specific to the API?&lt;/P&gt;
&lt;P data-start="230" data-end="438"&gt;Additionally, could you share the non-confidential sample code you used?&lt;BR data-start="302" data-end="305" /&gt;It would also be helpful if you could provide the journal file via the Private Forum chat so that I can analyze the issue further.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 07:47:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13820191#M84714</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2025-09-22T07:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2024 - Constantly getting managed exception with OpenAndActivateDocument</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13821316#M84721</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5661631"&gt;@naveen.kumar.t&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is only happening through the API. I can open the file through the UI just fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The original code is in C#:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;OpenOptions openOptions = new OpenOptions();
// I have tested commenting out the two lines below for modifying the openOptions, still getting the same error
openOptions.DetachFromCentralOption = DetachFromCentralOption.ClearTransmittedSaveAsNewCentral;
openOptions.SetOpenWorksetsConfiguration(new WorksetConfiguration(WorksetConfigurationOption.OpenAllWorksets));

Directory.CreateDirectory(@"C:\Revit_Projects");
string newLocalPathAndName = Path.Combine(@"C:\Revit_Projects", modelNames[0]
                        + "_" + uiApp.Application.Username + "_"
                        + DateTime.Now.ToString("ddMMMMyy_HHmm") + ".rvt");
ModelPath localModelPath = ModelPathUtils.ConvertUserVisiblePathToModelPath(newLocalPathAndName);
var createdDoc = uiApp.OpenAndActivateDocument(localModelPath, openOptions, false);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tested this in python with Revit Python Shell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;path = r'C:\Users\hzamani\Desktop\Project1.rvt'
#mpath = ModelPathUtils.ConvertUserVisiblePathToModelPath(path)
#options = OpenOptions()
#options.DetachFromCentralOption = DetachFromCentralOption.ClearTransmittedSaveAsNewCentral
#options.DetachFromCentralOption = DetachFromCentralOption.DoNotDetach
#options.SetOpenWorksetsConfiguration(WorksetConfiguration(WorksetConfigurationOption.OpenAllWorksets))

uiapp = __revit__

#uiapp.OpenAndActivateDocument(mpath, options, False)
uiapp.OpenAndActivateDocument(path)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No matter what I do I still get the same error. This is happening in Revit 2024. Running the same code in Revit 2025 crashed Revit! In older version it's working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 23:31:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13821316#M84721</guid>
      <dc:creator>hzamani</dc:creator>
      <dc:date>2025-09-22T23:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2024 - Constantly getting managed exception with OpenAndActivateDocument</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13823707#M84730</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4391054"&gt;@hzamani&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://autodesk.slack.com/archives/C0SR6NAP8/p1758703735461559" target="_blank" rel="noopener"&gt;A suggestion from Engineering team&lt;/A&gt;: Could you try using "Save As" instead of "Close and Save" to clear the transmittal status and mark the model as a new central?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Sep 2025 13:24:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13823707#M84730</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2025-09-24T13:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2024 - Constantly getting managed exception with OpenAndActivateDocument</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13824415#M84733</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5661631"&gt;@naveen.kumar.t&lt;/a&gt;&amp;nbsp;will give this a try.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Sep 2025 22:49:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2024-constantly-getting-managed-exception-with/m-p/13824415#M84733</guid>
      <dc:creator>hzamani</dc:creator>
      <dc:date>2025-09-24T22:49:02Z</dc:date>
    </item>
  </channel>
</rss>

