Structural Connections not exported via Document.Export (Revit 2018/Python)

Structural Connections not exported via Document.Export (Revit 2018/Python)

igmuz
Contributor Contributor
3,318 Views
29 Replies
Message 1 of 30

Structural Connections not exported via Document.Export (Revit 2018/Python)

igmuz
Contributor
Contributor

I am trying to export REVIT Structural Connections to IFC with Document.Export.

 

When export is run from Python, all Generic Models with Family Category set to "Structural Connections" get exported, while none of the REVIT Structural Connections is exported.

From User Interface I manage to export both without a problem. In Family Mapping File, Revit Category Structural Connections is mapped to IFC Class Name IfcBuildingElementProxy.

 

Python code is shown below:

options=IFCExportOptions()
options.ExportBaseQuantities = False
options.FileVersion = IFCVersion.IFC2x3CV2
options.SpaceBoundaryLevel=0
options.WallAndColumnSplitting=False
options.FamilyMappingFile="D:\IFC_options.txt"
options.AddOption("ExportInternalRevitPropertySets","true")
options.FilterViewId = views[i].Id
DocumentManager.Instance.CurrentDBDocument.Export("D:\IFC eksport","Structural_Connections.ifc",options)

0 Likes
Accepted solutions (2)
3,319 Views
29 Replies
Replies (29)
Message 21 of 30

jeremytammik
Autodesk
Autodesk

OK, I got your macro to run successfully on my system, and it displayed the message box saying, IFC exported.

 

Now what?

 

Should I manually scan the IFC file for something?

 

If so, for what?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 22 of 30

igmuz
Contributor
Contributor

The macro generates file "Export Structural Connections_API.ifc" and saves it in current file folder.

 

You will notice that, when export is run from API, none of the REVIT Structural Connections are exported, although Generic Models with Family Category set to "Structural Connections" gets exported.

 

If you export model to IFC via User Interface, both type of structural connections get exported.

 

IFC exported by user interface looks like this:  

Export UI.PNG

 

And when exported via API, structural connection defined via REVIT Add-In is not exported:

Export API.PNG

 

 

0 Likes
Message 23 of 30

jeremytammik
Autodesk
Autodesk

You say, 'you will notice that...'.

 

I performed the export and did not notice anything at all, except that an IFC file was generated.

 

What does one need to do to notice it, please?

 

Do you possibly mean something like 'download and install this or that free open source IFC viewer, open the IFC file in that, and note that...'?

 

🙂

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 24 of 30

igmuz
Contributor
Contributor

Here is step-by-step procedure:

1. Run macro.

    "Export Structural Connections_API.ifc" is generated in the current file folder.

 

2. Do IFC Export via User Interface (File->Export->IFC).

     You can call this IFC file for example "Export Structural Connections_UI.ifc"

 

3. Open both IFC files in IFC viewer of your choice.

"Export Structural Connections_UI.ifc" looks like this:

Export UI.PNG

 

"Export Structural Connections_API.ifc" looks like this:

Export API.PNG

 

4. Note that REVIT Structural Connection below column on the left is missing in "Export Structural Connections_API.ifc". That is the bug we are trying to fix! 🙂

Message 25 of 30

jeremytammik
Autodesk
Autodesk

What exact version and build of Revit are you using?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 26 of 30

jeremytammik
Autodesk
Autodesk

Dear Igor, 

 

What version of Revit are you using?

 

Maybe, the reason the development team cannot reproduce the issue is due to an older version at your end.

 

Thank you!

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 27 of 30

igmuz
Contributor
Contributor

Hi Jeremy,

 

I am using Revit Structure 2018.3.

0 Likes
Message 28 of 30

jeremytammik
Autodesk
Autodesk
Accepted solution

Can you try it out in Revit 2019 or Revit 2020, please? It may well be resolved now. Thank you!

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 29 of 30

igmuz
Contributor
Contributor

Hi,

 

In REVIT 2019 it works like a charm. 🙂

Thank you for all of your help Jeremy.

0 Likes
Message 30 of 30

jeremytammik
Autodesk
Autodesk

Very glad to hear so. Thank you for your appreciation!

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes