Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WallSweepExporter.cs #699

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions Source/Revit.IFC.Export/Exporter/WallSweepExporter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//
//
// BIM IFC library: this library works with Autodesk(R) Revit(R) to export IFC files containing model geometry.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that currently the master branch is not up-to-date. Look at the 24 branch for the latest. We will be updating the master branch to avoid future confusion.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: in 23.3.1 it had not been updated.

image

// Copyright (C) 2012 Autodesk, Inc.
//
Expand Down Expand Up @@ -45,10 +45,20 @@ public static void Export(ExporterIFC exporterIFC, WallSweep wallSweep, Geometry
//Reveals are exported as openings with wall exporter.
if (wallSweepInfo.WallSweepType == WallSweepType.Reveal)
return;

if (!ProxyElementExporter.Export(exporterIFC, wallSweep, geometryElement, productWrapper))
// Get current document from WallSweep element
var doc = wallSweep.Document;
// Get profile family of wall sweep
var profileElement = doc.GetElement(wallSweepInfo.ProfileId);
// Get export type of profile element
IFCExportInfoPair exportType = ExporterUtil.GetProductExportType(exporterIFC, profileElement, out var ifcEnumType);
// Create a generic Export-Type
IFCExportInfoPair genericExportType = new IFCExportInfoPair(exportType.ExportInstance, exportType.ExportType, ifcEnumType);
// Set value with pair
genericExportType.SetValueWithPair(exportType.ExportInstance, ifcEnumType);
// Check if it should be exported as IfcBuildingElementProxy
if (!ProxyElementExporter.Export(exporterIFC, wallSweep, geometryElement, productWrapper, exportType: genericExportType))
return;

// If not as IfcElementBuildingProxy then with its correct type.
HostObjectExporter.ExportHostObjectMaterials(exporterIFC, wallSweep, productWrapper.GetAnElement(),
geometryElement, productWrapper,
ElementId.InvalidElementId, Toolkit.IFCLayerSetDirection.Axis2, null, null);
Expand Down