<?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: Export ifc access denied in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/export-ifc-access-denied/m-p/8000997#M50105</link>
    <description>&lt;P&gt;its is really strange as i get it working for Dwg / nwc and whatsoever.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;made absolutely sure the dir exists by doublechecking with the Directory.exists(path) bool. its returning a true (as i knew should &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; )&lt;/P&gt;&lt;P&gt;So i tried running as Admin: nope...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the next step was to try a an empty string "" and that already gave me a more sensible error message:&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;Modifying&amp;nbsp; is forbidden because the document has no open transaction.&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although i think its is a strange message. after all, Why would an export need an transaction ?&lt;/P&gt;&lt;P&gt;but the good thing is, it worked !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so it seems that the IFC export needs to be done within an transaction, while the other exports (nwc/dwg) do not need an transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the final step was to again try to set a name, with the only difference that the export is done within an transaction:&lt;/P&gt;&lt;P&gt;All worked as designed!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 May 2018 18:13:27 GMT</pubDate>
    <dc:creator>dante.van.wettum</dc:creator>
    <dc:date>2018-05-14T18:13:27Z</dc:date>
    <item>
      <title>Export ifc access denied</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/export-ifc-access-denied/m-p/7999911#M50103</link>
      <description>&lt;P&gt;the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;try
                                {
                                    ifcExport(doc, v, "name_of_file", "C:\\test123\\ifc_out");
                                }
                                catch (Exception ex) { File.AppendAllLines(path, new string[] { "ifcExport Exception: " + ex.Message }); }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public void ifcExport(Document doc, Autodesk.Revit.DB.View viewExport, string filename, string path)&lt;BR /&gt; {&lt;BR /&gt; IFCExportOptions ifcOptions = new IFCExportOptions();&lt;BR /&gt; ifcOptions.ExportBaseQuantities = true;&lt;BR /&gt; ifcOptions.FamilyMappingFile = "C:\\test123\\SAS_IFC-export.txt";&lt;BR /&gt; ifcOptions.FileVersion = IFCVersion.IFC2x3;&lt;BR /&gt; ifcOptions.FilterViewId = viewExport.Id;&lt;BR /&gt; ifcOptions.WallAndColumnSplitting = true;&lt;BR /&gt;&lt;BR /&gt; doc.Export(path, filename, ifcOptions);&lt;BR /&gt; }&lt;/PRE&gt;&lt;P&gt;but for some reason it keeps giving me this error message, no matter what folder i choose to export to.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Access to the path 'C:\test123\ifc_out' is denied.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and to make the case even stranger, if i make an nwc export to the exact same folder and that works without any errors or warnings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have no idea why it does give me this error for an ifc file while i can write other file types to the folder without any issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;it made me also wonder, when i installed the IFC for revit (from Autodesk) do i even need to call the default doc.export ? or is there another method i should be calling to make the ifc exports ?&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 11:17:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/export-ifc-access-denied/m-p/7999911#M50103</guid>
      <dc:creator>dante.van.wettum</dc:creator>
      <dc:date>2018-05-14T11:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Export ifc access denied</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/export-ifc-access-denied/m-p/8000442#M50104</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Dante,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your query.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;That does sound strange indeed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What happens if you specify no path at all?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Oh no, I see that the folder must exist, according to the docs:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://www.revitapidocs.com/2018.1/7efa4eb3-8d94-b8e7-f608-3dbae751331d.htm" target="_blank"&gt;http://www.revitapidocs.com/2018.1/7efa4eb3-8d94-b8e7-f608-3dbae751331d.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For testing purposes, I would use the simplest possible one, and one that belongs to you, e.g., your Windows home folder, or run Revit as administrator, so that it has more powerful access when writing files.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The output filename can be left empty, it seems.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Afaik, the IFC for Revit is automatically hooked up to the standard doc.Export method.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would also try raising this question in the IFC for Revit discussion forum:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://sourceforge.net/p/ifcexporter/discussion/general" target="_blank"&gt;https://sourceforge.net/p/ifcexporter/discussion/general&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;They are presumably the most experienced with all IFC-related questions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 14:33:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/export-ifc-access-denied/m-p/8000442#M50104</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-05-14T14:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Export ifc access denied</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/export-ifc-access-denied/m-p/8000997#M50105</link>
      <description>&lt;P&gt;its is really strange as i get it working for Dwg / nwc and whatsoever.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;made absolutely sure the dir exists by doublechecking with the Directory.exists(path) bool. its returning a true (as i knew should &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; )&lt;/P&gt;&lt;P&gt;So i tried running as Admin: nope...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the next step was to try a an empty string "" and that already gave me a more sensible error message:&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;Modifying&amp;nbsp; is forbidden because the document has no open transaction.&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although i think its is a strange message. after all, Why would an export need an transaction ?&lt;/P&gt;&lt;P&gt;but the good thing is, it worked !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so it seems that the IFC export needs to be done within an transaction, while the other exports (nwc/dwg) do not need an transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the final step was to again try to set a name, with the only difference that the export is done within an transaction:&lt;/P&gt;&lt;P&gt;All worked as designed!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2018 18:13:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/export-ifc-access-denied/m-p/8000997#M50105</guid>
      <dc:creator>dante.van.wettum</dc:creator>
      <dc:date>2018-05-14T18:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Export ifc access denied</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/export-ifc-access-denied/m-p/8002081#M50106</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Dante,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your update.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Aha!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;A simple case of RTFM:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://www.revitapidocs.com/2018.1/7efa4eb3-8d94-b8e7-f608-3dbae751331d.htm" target="_blank"&gt;http://www.revitapidocs.com/2018.1/7efa4eb3-8d94-b8e7-f608-3dbae751331d.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Export Method (String, String, IFCExportOptions)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Remarks&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Exporting to IFC requires that document is modifiable, therefore there must be a transaction already open when this method is called.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This method may not be invoked during dynamic update, for the internal routine might need to modify the existing transaction.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I noticed that remark when I checked yesterday, but omitted explicitly pointing it out...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Glad you found it!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 07:07:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/export-ifc-access-denied/m-p/8002081#M50106</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-05-15T07:07:03Z</dc:date>
    </item>
  </channel>
</rss>

