Skip to content

Commit 066db42

Browse files
authored
Merge pull request #551 from Autodesk/babio/23_2_3_update_ifc_extension
23_2_3 IFC Extension update.
2 parents 4e386bb + 110ae6d commit 066db42

File tree

307 files changed

+162969
-37484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

307 files changed

+162969
-37484
lines changed
Binary file not shown.

Install/Program Files to Install/IFC Shared Parameters-RevitIFCBuiltIn-Type_ALL.txt

+6,800-4,256
Large diffs are not rendered by default.

Install/Program Files to Install/IFC Shared Parameters-RevitIFCBuiltIn_ALL.txt

+6,810-4,264
Large diffs are not rendered by default.

Install/Program Files to Install/IFC4RV.xsd

+14,303
Large diffs are not rendered by default.

Install/Program Files to Install/IFC4X3.xsd

+15,980
Large diffs are not rendered by default.

Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm

+52
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,58 @@ <h2 id="VersionHistory" name="VersionHistory">Version History</h2>
238238

239239
<div class="versionset">
240240

241+
<div class="version">23.2.3.0</div><div class="versioninfo-bullet">
242+
<br><p>
243+
General:
244+
<ul>
245+
<li>This is the official release of IFC Extension 23.2.3
246+
<li>It contains a various improvements and bug fixes for the previous 23.1.1 version.
247+
</ul>
248+
</p>
249+
<br>
250+
<p>
251+
Improvements:
252+
<ul>
253+
<li>Added known IFC MVDs in the Entity selection UI
254+
<li>Added information in the IFC Header description for the selected CoordinateReference on export following this format: 'CoordinateReference [CoordinateBase: <coord. base selected>, ProjectSite: <project site selected>]'. ProjectSite may not be present if it is not specified.
255+
<li>Added new parameters to support IFC certification for various types of data that are needed to map into Revit
256+
<li>Added Revit Version Identifiers to IFC export
257+
<li>Implemented mapping specific built-in material properties to the right place in IFC
258+
<li>Implemented support of IfcBuildingElementProxy.COMPLEX in link IFC
259+
<li>Implemented import of IfcGroup assignment information
260+
<li>Improved export of levels marked as building stories to IFC, regardless of whether they contained elements based on them or not.
261+
<li>Improved creation of classifications
262+
<li>Material properties export implemented.
263+
<li>Optimized LinearForce and PlanarForce unit import/export
264+
<li>Various improvement for IFC4 RV Import Certification
265+
<li>Various improvements for GUID consistency in exported entities.
266+
</ul>
267+
</p>
268+
<br>
269+
<p>
270+
Bug Fixes:
271+
<ul>
272+
<li>Added IfcDoorType support on import
273+
<li>Added support of IfcAdvancedFace in IfcFaceBasedSurfaceModel
274+
<li>Added support for IfcGeometricSet entities when reading Axis representations of non-standard IFC files.
275+
<li>Improved link of IFC files with unrecognized coordinate systems.
276+
<li>Fixed preserving of original entity information when opening IFC file to preserve entity type on re-export.
277+
<li>Fixed Navisworks IFC import positioning issue.
278+
<li>Fixed linking of profiles with tiny gaps/segments between arcs.
279+
<li>Fixed exporting parts in assembly with the wrong elevation.
280+
<li>Fixed the overall height and width values when exporting certain door families with voids instead of host openings to IFC.
281+
<li>Fixed missing properties of structural framing elements exported to IFC as base quantities.
282+
<li>Fixed duplicated DerivedUnitElements
283+
<li>Fixed "There has been an unrecoverable error during export Revit." when exporting certain files to IFC containing classification codes.
284+
<li>Fixed export of slab with separate pieces that exported as one object to IFC
285+
<li>Modified some button sizes to fix GLOB truncation issue
286+
<li>Provide user visible warning when exporting to IFC4 DTV
287+
<li>Removed "IFC override -" prefix in export dialogs
288+
</ul>
289+
</p>
290+
<br>
291+
</div>
292+
<br>
241293
<div class="version">23.1.1.0</div><div class="versioninfo-bullet">
242294

243295
<br><p>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="Revit" ProductType="Application" Name="IFC Exporter for Revit" AppVersion="23.1.1.0" Description="This application seamlessly replaces the built-in IFC export capabilities of Revit 2023. " Author="Autodesk" Icon=".\Contents\Resources\IFCExporter.png" AppNameSpace="appstore.exchange.autodesk.com" OnlineDocumentation="http://www.autodesk.com" HelpFile=".\Contents\Resources\ADSKIFCExporterHelp.htm" ProductCode="{40527B9C-60B8-407E-BF56-7AAA67F07ACA}" UpgradeCode="{A27E008E-2278-4F84-BB3B-59C605168900}" SupportedLocales="Enu">
2+
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="Revit" ProductType="Application" Name="IFC Exporter for Revit" AppVersion="23.2.3.0" Description="This application seamlessly replaces the built-in IFC export capabilities of Revit 2023. " Author="Autodesk" Icon=".\Contents\Resources\IFCExporter.png" AppNameSpace="appstore.exchange.autodesk.com" OnlineDocumentation="http://www.autodesk.com" HelpFile=".\Contents\Resources\ADSKIFCExporterHelp.htm" ProductCode="{40527B9C-60B8-407E-BF56-7AAA67F07ACA}" UpgradeCode="{A27E008E-2278-4F84-BB3B-59C605168900}" SupportedLocales="Enu">
33
<CompanyDetails Name="Autodesk, Inc." Phone=" " Url="http://www.autodesk.com" Email="[email protected]" />
44
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2023" SeriesMax="R2023" />
55
<Components Description="2023">
66
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2023" SeriesMax="R2023" />
7-
<ComponentEntry AppName="IFC For Revit 2023" Version="23.1.1" ModuleName="./Contents/2023/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2023" />
8-
<ComponentEntry AppName="IFC For Revit 2023" Version="23.1.1" ModuleName="./Contents/2023/Revit.IFC.addin" AppDescription="IFC For Revit 2023" />
7+
<ComponentEntry AppName="IFC For Revit 2023" Version="23.2.3" ModuleName="./Contents/2023/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2023" />
8+
<ComponentEntry AppName="IFC For Revit 2023" Version="23.2.3" ModuleName="./Contents/2023/Revit.IFC.addin" AppDescription="IFC For Revit 2023" />
99
</Components>
1010
</ApplicationPackage>

Install/RevitIFCSetupWix/Product.wxs

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
33
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
44

5-
<Product Id="2699C2A8-8493-418B-B83E-0ADB317E3B65" Name="Revit IFC 2023" Language="1033" Version="23.1.1.0" Manufacturer="Autodesk" UpgradeCode="1A9C2C21-23B8-42D2-0000-992E73C11B3F">
5+
<Product Id="1A9C2C21-2322-42D2-0000-992E73C12300" Name="Revit IFC 2023" Language="1033" Version="23.2.3.0" Manufacturer="Autodesk" UpgradeCode="1A9C2C21-23B8-42D2-0000-992E73C11B3F">
66
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
77

88
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
@@ -114,6 +114,9 @@
114114
<Component Id = "COMP_IFC_Common_DLL" Guid="C7ED4A2C-DCB1-457E-968F-2DDE9993C1B6">
115115
<File Id ="FILE_Ifc_Common_DLL" Name="Revit.IFC.Common.dll" Source="$(var.ProjectDir)..\Program Files to Install\Revit.IFC.Common.dll" KeyPath="yes" />
116116
</Component>
117+
<Component Id = "COMP_IFC_Import_Core_DLL" Guid="33DEBE0A-57D1-4BFC-BC99-FDA776B6224E">
118+
<File Id ="FILE_Ifc_Import_Core_DLL" Name="Revit.IFC.Import.Core.dll" Source="$(var.ProjectDir)..\Program Files to Install\Revit.IFC.Import.Core.dll" KeyPath="yes" />
119+
</Component>
117120
<?else?>
118121
<Component Id = "COMP_IFC_Export_DLL" Guid="D59E44AA-89A3-4CD7-AD9C-8D4D7AC6026B">
119122
<File Id ="FILE_Ifc_Export_DLL" Name="Revit.IFC.Export.dll" Source="$(var.Revit.IFC.Export.TargetDir)Revit.IFC.Export.dll" KeyPath="yes" />
@@ -172,6 +175,12 @@
172175
<Component Id = "COMP_IFC4_XSD" Guid="51B549A3-DCB2-412B-9D4D-1B72D901D2B3">
173176
<File Id ="FILE_IFC4_XSD" Name="IFC4.xsd" Source="$(var.ProjectDir)..\Program Files to Install\IFC4.xsd" KeyPath="yes" />
174177
</Component>
178+
<Component Id = "COMP_IFC4RV_XSD" Guid="C23C0681-71CE-44B2-9E22-F0DF87587C1E">
179+
<File Id ="FILE_IFC4RV_XSD" Name="IFC4RV.xsd" Source="$(var.ProjectDir)..\Program Files to Install\IFC4RV.xsd" KeyPath="yes" />
180+
</Component>
181+
<Component Id = "COMP_IFC4X3_XSD" Guid="9531BB44-C7E8-4EEE-AF26-6EBFB5562711">
182+
<File Id ="FILE_IFC4X3_XSD" Name="IFC4X3.xsd" Source="$(var.ProjectDir)..\Program Files to Install\IFC4X3.xsd" KeyPath="yes" />
183+
</Component>
175184
<Component Id = "COMP_IFC_Shared_Parameters_RevitIFCBuiltIn_ALL_TXT" Guid="BD6EB78A-7AED-40C3-9B24-AA74652A3C25">
176185
<File Id ="FILE_IFC_Shared_Parameters_RevitIFCBuiltIn_ALL" Name="IFC Shared Parameters-RevitIFCBuiltIn_ALL.txt" Source="$(var.ProjectDir)..\Program Files to Install\IFC Shared Parameters-RevitIFCBuiltIn_ALL.txt" KeyPath="yes" />
177186
</Component>

Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ProductVersion>3.8</ProductVersion>
77
<ProjectGuid>7dfbd495-c588-4c7b-b8f6-5b793adb06f2</ProjectGuid>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<OutputName>IFC for Revit 2023.1.1.0</OutputName>
9+
<OutputName>IFC for Revit 2023.2.3.0</OutputName>
1010
<OutputType>Package</OutputType>
1111
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
1212
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>

Install/RevitIFCSetupWix/buildInstaller.bat

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ rem It is necessary to add the Wix bin directory to the system path temporarily
1111
SET PATH=%PATH%;%WixRoot%
1212

1313
candle.exe -dProjectDir=%2 -ext WixUtilExtension %2Product.wxs
14-
light.exe -ext WixUtilExtension -out RevitIFC2023.msi product.wixobj -ext WixUIExtension
14+
light.exe -ext WixUtilExtension -out RevitIFC2023.2.3.msi product.wixobj -ext WixUIExtension
1515

16-
copy RevitIFC2023.msi %1..\Releasex64
17-
del RevitIFC2023.msi
16+
copy RevitIFC2023.2.3.msi %1..\Releasex64
17+
del RevitIFC2023.2.3.msi
1818

19-
echo %1..\Releasex64\RevitIFC2023.msi
19+
echo %1..\Releasex64\RevitIFC2023.2.3.msi

Source/IFCExporterUIOverride/IFCCommandOverrideApplication.cs

+17-14
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
using Autodesk.Revit.UI.Events;
2929
using Revit.IFC.Common.Extensions;
3030
using Revit.IFC.Common.Utility;
31+
using Revit.IFC.Export.Utility;
3132
using Autodesk.Revit.DB.ExternalService;
3233

3334

@@ -236,13 +237,12 @@ public void OnIFCExport(object sender, CommandEventArgs args)
236237

237238
// Prompt the user for the file location and path
238239
string defaultExt = mainWindow.DefaultExt;
239-
String fullName = mainWindow.ExportFilePathName;
240-
String path = Path.GetDirectoryName(fullName);
241-
String fileName = multipleFiles ? Properties.Resources.MultipleFiles : Path.GetFileName(fullName);
242-
240+
string fullName = mainWindow.ExportFilePathName;
241+
string path = Path.GetDirectoryName(fullName);
242+
string fileName = multipleFiles ? Properties.Resources.MultipleFiles : Path.GetFileName(fullName);
243243

244244
// This option should be rarely used, and is only for consistency with old files. As such, it is set by environment variable only.
245-
String use2009GUID = Environment.GetEnvironmentVariable("Assign2009GUIDToBuildingStoriesOnIFCExport");
245+
string use2009GUID = Environment.GetEnvironmentVariable("Assign2009GUIDToBuildingStoriesOnIFCExport");
246246
bool use2009BuildingStoreyGUIDs = (use2009GUID != null && use2009GUID == "1");
247247

248248
string unsuccesfulExports = string.Empty;
@@ -283,7 +283,7 @@ public void OnIFCExport(object sender, CommandEventArgs args)
283283
IFCExportOptions exportOptions = new IFCExportOptions();
284284

285285
ElementId activeViewId = GenerateActiveViewIdFromDocument(document);
286-
selectedConfig.ActiveViewId = selectedConfig.UseActiveViewGeometry ? activeViewId : ElementId.InvalidElementId;
286+
selectedConfig.ActiveViewId = selectedConfig.UseActiveViewGeometry ? activeViewId.IntegerValue : -1;
287287
selectedConfig.UpdateOptions(exportOptions, activeViewId);
288288

289289
bool result = document.Export(path, fileName, exportOptions);
@@ -506,8 +506,8 @@ public void ExportLinkedDocuments(Autodesk.Revit.DB.Document document, string fi
506506

507507
// get the link instances
508508
List<RevitLinkInstance> currRvtLinkInstances = rvtLinkNamesToInstancesDict[linkPathName];
509-
IList<string> serTransforms = new List<string>();
510509
IList<string> linkFileNames = new List<string>();
510+
IList<Tuple<ElementId, string>> serTransforms = new List<Tuple<ElementId, string>>();
511511

512512
Document linkDocument = null;
513513
double lengthScaleFactorLink = 1.0;
@@ -557,14 +557,14 @@ public void ExportLinkedDocuments(Autodesk.Revit.DB.Document document, string fi
557557
}
558558

559559
// get the link file path and name
560-
String linkFileName = GetLinkFileName(linkDocument, linkPathName);
560+
string linkFileName = GetLinkFileName(linkDocument, linkPathName);
561561

562562
//if link was an IFC file then make a different formating to the file name
563563
if ((linkPathName.Length >= 4 && linkPathName.Substring(linkPathName.Length - 4).ToLower() == ".ifc") ||
564564
(linkPathName.Length >= 7 && linkPathName.Substring(linkPathName.Length - 7).ToLower() == ".ifcxml") ||
565565
(linkPathName.Length >= 7 && linkPathName.Substring(linkPathName.Length - 7).ToLower() == ".ifczip"))
566566
{
567-
String fName = fileName;
567+
string fName = fileName;
568568

569569
//get output path and add to the new file name
570570
index = fName.LastIndexOf("\\");
@@ -604,7 +604,7 @@ public void ExportLinkedDocuments(Autodesk.Revit.DB.Document document, string fi
604604
tr.Origin *= lengthScaleFactorLink;
605605

606606
// serialize transform
607-
serTransforms.Add(SerializeTransform(tr));
607+
serTransforms.Add(Tuple.Create(currRvtLinkInstance.Id, SerializeTransform(tr)));
608608
}
609609

610610
// IFC export requires an open transaction, although no changes should be made
@@ -624,8 +624,11 @@ public void ExportLinkedDocuments(Autodesk.Revit.DB.Document document, string fi
624624

625625
for (int ind = 0; ind < numLinkInstancesToExport; ind++)
626626
{
627-
string optionName = (ind == 0) ? "ExportLinkInstanceTransform" : "ExportLinkInstanceTransform" + (ind + 1).ToString();
628-
exportOptions.AddOption(optionName, serTransforms[ind]);
627+
string optionName = (ind == 0) ? "ExportLinkId" : "ExportLinkId" + (ind + 1).ToString();
628+
exportOptions.AddOption(optionName, serTransforms[ind].Item1.ToString());
629+
630+
optionName = (ind == 0) ? "ExportLinkInstanceTransform" : "ExportLinkInstanceTransform" + (ind + 1).ToString();
631+
exportOptions.AddOption(optionName, serTransforms[ind].Item2);
629632

630633
// Don't pass in file name for the first link instance.
631634
if (ind == 0)
@@ -636,8 +639,8 @@ public void ExportLinkedDocuments(Autodesk.Revit.DB.Document document, string fi
636639
}
637640

638641
// Pass in the first value; the rest will be in the options.
639-
String path_ = Path.GetDirectoryName(linkFileNames[0]);
640-
String fileName_ = Path.GetFileName(linkFileNames[0]);
642+
string path_ = Path.GetDirectoryName(linkFileNames[0]);
643+
string fileName_ = Path.GetFileName(linkFileNames[0]);
641644
bool result = linkDocument.Export(path_, fileName_, exportOptions); // pass in the options here
642645
}
643646
catch

Source/IFCExporterUIOverride/IFCEntityTree/BrowseIFCEntityServer.cs

+78-11
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,87 @@ namespace BIM.IFC.Export.UI.IFCEntityTree
1414
{
1515
public class BrowseIFCEntityServer : IIFCEntityTreeUIServer
1616
{
17+
private (bool, string, string) ShowDialogCommon(bool showTypeNodeOnly,
18+
string preSelectEnt, string preSelectPDef, IFCExternalServiceUIData data)
19+
{
20+
EntityTree theTree = new EntityTree(showTypeNodeOnly,
21+
preSelectEntity: preSelectEnt, preSelectPdef: preSelectPDef);
22+
23+
bool? ret = theTree.ShowDialog();
24+
if (ret.HasValue && ret.Value == true)
25+
{
26+
string selEntity = theTree.GetSelectedEntity();
27+
string selPDef = theTree.GetSelectedPredefinedType();
28+
data.IsReset = theTree.isReset;
29+
return (true, selEntity, selPDef);
30+
}
31+
32+
return (false, null, null);
33+
}
34+
1735
/// <summary>
18-
/// Launch the IFC Entity tree browser
36+
/// Launches the IFC Entity tree browser.
1937
/// </summary>
20-
/// <param name="data"></param>
21-
/// <returns>status</returns>
38+
/// <param name="data">The IFCExternalServiceUIData from the native code.</param>
39+
/// <returns>The return status of the dialog window.</returns>
2240
public bool ShowDialog(IFCExternalServiceUIData data)
2341
{
2442
HashSet<string> assignedEntities = new HashSet<string>();
2543
HashSet<string> assignedPredef = new HashSet<string>();
2644
string preSelectEnt = null;
2745
string preSelectPDef = null;
46+
47+
Document document = data.Document;
48+
if (document == null)
49+
return false;
50+
51+
if (document.IsFamilyDocument)
52+
{
53+
using (Transaction tr = new Transaction(document))
54+
{
55+
try
56+
{
57+
tr.Start("IFC Entity Selection");
58+
}
59+
catch { }
60+
61+
FamilyManager familyManager = document.FamilyManager;
62+
FamilyType familyType = familyManager.CurrentType;
63+
64+
FamilyParameter exportTypeAs = familyManager?.get_Parameter(BuiltInParameter.IFC_EXPORT_ELEMENT_TYPE_AS);
65+
FamilyParameter exportPredefinedTypeAs = familyManager?.get_Parameter(BuiltInParameter.IFC_EXPORT_PREDEFINEDTYPE_TYPE);
66+
67+
if ((exportTypeAs?.StorageType != StorageType.String) ||
68+
(exportPredefinedTypeAs?.StorageType != StorageType.String))
69+
return false;
70+
71+
preSelectEnt = familyType?.AsString(exportTypeAs);
72+
preSelectPDef = familyType?.AsString(exportPredefinedTypeAs);
73+
74+
(bool ret, string selEntity, string selPDef) =
75+
ShowDialogCommon(true, preSelectEnt, preSelectPDef, data);
76+
77+
if (ret)
78+
{
79+
if (data.ParamId.IntegerValue == (int)BuiltInParameter.IFC_EXPORT_ELEMENT_TYPE_AS)
80+
{
81+
familyManager.Set(exportPredefinedTypeAs, selPDef);
82+
data.SelectedIFCItem = selEntity;
83+
}
84+
else if (data.ParamId.IntegerValue == (int)BuiltInParameter.IFC_EXPORT_PREDEFINEDTYPE_TYPE)
85+
{
86+
familyManager.Set(exportTypeAs, selEntity);
87+
data.SelectedIFCItem = selPDef;
88+
}
89+
}
90+
91+
if (tr.HasStarted())
92+
tr.Commit();
93+
94+
return true;
95+
}
96+
}
97+
2898
foreach (ElementId elemId in data.GetRevitElementIds())
2999
{
30100
Element elem = data.Document.GetElement(elemId);
@@ -54,7 +124,7 @@ public bool ShowDialog(IFCExternalServiceUIData data)
54124
if (assignedPredef.Count == 1 && !assignedPredef.First().Equals("<null>"))
55125
preSelectPDef = assignedPredef.First();
56126

57-
using (Transaction tr = new Transaction(data.Document))
127+
using (Transaction tr = new Transaction(document))
58128
{
59129
try
60130
{
@@ -64,15 +134,12 @@ public bool ShowDialog(IFCExternalServiceUIData data)
64134

65135
bool showTypeNodeOnly = data.ParamId.IntegerValue == (int)BuiltInParameter.IFC_EXPORT_ELEMENT_TYPE_AS
66136
|| data.ParamId.IntegerValue == (int)BuiltInParameter.IFC_EXPORT_PREDEFINEDTYPE_TYPE;
67-
EntityTree theTree = new EntityTree(showTypeNodeOnly, preSelectEntity: preSelectEnt, preSelectPdef: preSelectPDef);
68137

69-
bool? ret = theTree.ShowDialog();
70-
if (ret.HasValue && ret.Value == true)
71-
{
72-
string selEntity = theTree.GetSelectedEntity();
73-
string selPDef = theTree.GetSelectedPredefinedType();
74-
data.IsReset = theTree.isReset;
138+
(bool ret, string selEntity, string selPDef) =
139+
ShowDialogCommon(showTypeNodeOnly, preSelectEnt, preSelectPDef, data);
75140

141+
if (ret)
142+
{
76143
foreach (ElementId elemId in data.GetRevitElementIds())
77144
{
78145
Element elem = data.Document.GetElement(elemId);

0 commit comments

Comments
 (0)