does revit api support to save exported ifc fiile in memory stream programatically

does revit api support to save exported ifc fiile in memory stream programatically

gowtham_venkitusamy
Participant Participant
627 Views
7 Replies
Message 1 of 8

does revit api support to save exported ifc fiile in memory stream programatically

gowtham_venkitusamy
Participant
Participant


// Set up IFC export options file schema
IFCExportOptions exportOptions = new IFCExportOptions();
exportOptions.FileVersion = IFCVersion.IFC4RV;
exportOptions.AddOption("StoreIFCGUID", "true");
exportOptions.AddOption("VisibleElementsOfCurrentView", "true");
exportOptions.AddOption("ExportInternalRevitPropertySets", "true");
exportOptions.AddOption("ExportIFCCommonPropertySets", "true");
exportOptions.AddOption("TessellationLevelOfDetail", "0.25");

    MemoryStream ifcMemoryStream = new MemoryStream();
    bool exportSuccess = doc.Export(ifcMemoryStream, revitFileName, exportOptions);
Error :doc.Export" this particular export automatically changed ifc export to gbxmlexport
Severity Code Description Project File Line Suppression State
Error CS1503 Argument 3: cannot convert from 'Autodesk.Revit.DB.IFCExportOptions' to 'Autodesk.Revit.DB.GBXMLExportOptions' 
0 Likes
628 Views
7 Replies
Replies (7)
Message 2 of 8

jeremy_tammik
Alumni
Alumni

Short answer: 

  

  • No.

  

Explanation of the behaviour you describe:

  

The document IFC export method taking an IFCExportOptions argument takes a string as its first argument, representing a file name:

  

  

If you provide a non-string first argument, e.g., a MemoryStream, this overload cannot be found, so it picks an arbitrary one of the various Export overloads to tell you that you are making a mistake.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 8

gowtham_venkitusamy
Participant
Participant
is revit api only supports to export ifc file to local in programatically or using revit i can able to export ifc file to cloud?
0 Likes
Message 4 of 8

jeremy_tammik
Alumni
Alumni

The built-in Revit IFC export is to a file on the hard disk. The entire IFC export functionality is open source, however, so you can tweak it to your needs:

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 5 of 8

gowtham_venkitusamy
Participant
Participant

is this revit api  functionality works within the revit or out side the revit

0 Likes
Message 6 of 8

jeremy_tammik
Alumni
Alumni

Within.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 7 of 8

gowtham_venkitusamy
Participant
Participant

https://github.com/Autodesk/revit-ifc      iam asking about this revit -ifc functionality works within the revit or out side the revit

0 Likes
Message 8 of 8

jeremy_tammik
Alumni
Alumni

Within.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes