Skip to content

Commit

Permalink
Merge pull request #551 from Autodesk/babio/23_2_3_update_ifc_extension
Browse files Browse the repository at this point in the history
23_2_3 IFC Extension update.
  • Loading branch information
o-babii authored Dec 2, 2022
2 parents 4e386bb + 110ae6d commit 066db42
Show file tree
Hide file tree
Showing 307 changed files with 162,969 additions and 37,484 deletions.
Binary file not shown.
11,056 changes: 6,800 additions & 4,256 deletions Install/Program Files to Install/IFC Shared Parameters-RevitIFCBuiltIn-Type_ALL.txt

Large diffs are not rendered by default.

11,074 changes: 6,810 additions & 4,264 deletions Install/Program Files to Install/IFC Shared Parameters-RevitIFCBuiltIn_ALL.txt

Large diffs are not rendered by default.

14,303 changes: 14,303 additions & 0 deletions Install/Program Files to Install/IFC4RV.xsd

Large diffs are not rendered by default.

15,980 changes: 15,980 additions & 0 deletions Install/Program Files to Install/IFC4X3.xsd

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,58 @@ <h2 id="VersionHistory" name="VersionHistory">Version History</h2>

<div class="versionset">

<div class="version">23.2.3.0</div><div class="versioninfo-bullet">
<br><p>
General:
<ul>
<li>This is the official release of IFC Extension 23.2.3
<li>It contains a various improvements and bug fixes for the previous 23.1.1 version.
</ul>
</p>
<br>
<p>
Improvements:
<ul>
<li>Added known IFC MVDs in the Entity selection UI
<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.
<li>Added new parameters to support IFC certification for various types of data that are needed to map into Revit
<li>Added Revit Version Identifiers to IFC export
<li>Implemented mapping specific built-in material properties to the right place in IFC
<li>Implemented support of IfcBuildingElementProxy.COMPLEX in link IFC
<li>Implemented import of IfcGroup assignment information
<li>Improved export of levels marked as building stories to IFC, regardless of whether they contained elements based on them or not.
<li>Improved creation of classifications
<li>Material properties export implemented.
<li>Optimized LinearForce and PlanarForce unit import/export
<li>Various improvement for IFC4 RV Import Certification
<li>Various improvements for GUID consistency in exported entities.
</ul>
</p>
<br>
<p>
Bug Fixes:
<ul>
<li>Added IfcDoorType support on import
<li>Added support of IfcAdvancedFace in IfcFaceBasedSurfaceModel
<li>Added support for IfcGeometricSet entities when reading Axis representations of non-standard IFC files.
<li>Improved link of IFC files with unrecognized coordinate systems.
<li>Fixed preserving of original entity information when opening IFC file to preserve entity type on re-export.
<li>Fixed Navisworks IFC import positioning issue.
<li>Fixed linking of profiles with tiny gaps/segments between arcs.
<li>Fixed exporting parts in assembly with the wrong elevation.
<li>Fixed the overall height and width values when exporting certain door families with voids instead of host openings to IFC.
<li>Fixed missing properties of structural framing elements exported to IFC as base quantities.
<li>Fixed duplicated DerivedUnitElements
<li>Fixed "There has been an unrecoverable error during export Revit." when exporting certain files to IFC containing classification codes.
<li>Fixed export of slab with separate pieces that exported as one object to IFC
<li>Modified some button sizes to fix GLOB truncation issue
<li>Provide user visible warning when exporting to IFC4 DTV
<li>Removed "IFC override -" prefix in export dialogs
</ul>
</p>
<br>
</div>
<br>
<div class="version">23.1.1.0</div><div class="versioninfo-bullet">

<br><p>
Expand Down
6 changes: 3 additions & 3 deletions Install/Program Files to Install/bundle/PackageContents.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<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">
<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">
<CompanyDetails Name="Autodesk, Inc." Phone=" " Url="http://www.autodesk.com" Email="[email protected]" />
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2023" SeriesMax="R2023" />
<Components Description="2023">
<RuntimeRequirements OS="Win64" Platform="Revit" SeriesMin="R2023" SeriesMax="R2023" />
<ComponentEntry AppName="IFC For Revit 2023" Version="23.1.1" ModuleName="./Contents/2023/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2023" />
<ComponentEntry AppName="IFC For Revit 2023" Version="23.1.1" ModuleName="./Contents/2023/Revit.IFC.addin" AppDescription="IFC For Revit 2023" />
<ComponentEntry AppName="IFC For Revit 2023" Version="23.2.3" ModuleName="./Contents/2023/IFCExporterUIOverride.addin" AppDescription="IFC For Revit 2023" />
<ComponentEntry AppName="IFC For Revit 2023" Version="23.2.3" ModuleName="./Contents/2023/Revit.IFC.addin" AppDescription="IFC For Revit 2023" />
</Components>
</ApplicationPackage>
11 changes: 10 additions & 1 deletion Install/RevitIFCSetupWix/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<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">
<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">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
Expand Down Expand Up @@ -114,6 +114,9 @@
<Component Id = "COMP_IFC_Common_DLL" Guid="C7ED4A2C-DCB1-457E-968F-2DDE9993C1B6">
<File Id ="FILE_Ifc_Common_DLL" Name="Revit.IFC.Common.dll" Source="$(var.ProjectDir)..\Program Files to Install\Revit.IFC.Common.dll" KeyPath="yes" />
</Component>
<Component Id = "COMP_IFC_Import_Core_DLL" Guid="33DEBE0A-57D1-4BFC-BC99-FDA776B6224E">
<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" />
</Component>
<?else?>
<Component Id = "COMP_IFC_Export_DLL" Guid="D59E44AA-89A3-4CD7-AD9C-8D4D7AC6026B">
<File Id ="FILE_Ifc_Export_DLL" Name="Revit.IFC.Export.dll" Source="$(var.Revit.IFC.Export.TargetDir)Revit.IFC.Export.dll" KeyPath="yes" />
Expand Down Expand Up @@ -172,6 +175,12 @@
<Component Id = "COMP_IFC4_XSD" Guid="51B549A3-DCB2-412B-9D4D-1B72D901D2B3">
<File Id ="FILE_IFC4_XSD" Name="IFC4.xsd" Source="$(var.ProjectDir)..\Program Files to Install\IFC4.xsd" KeyPath="yes" />
</Component>
<Component Id = "COMP_IFC4RV_XSD" Guid="C23C0681-71CE-44B2-9E22-F0DF87587C1E">
<File Id ="FILE_IFC4RV_XSD" Name="IFC4RV.xsd" Source="$(var.ProjectDir)..\Program Files to Install\IFC4RV.xsd" KeyPath="yes" />
</Component>
<Component Id = "COMP_IFC4X3_XSD" Guid="9531BB44-C7E8-4EEE-AF26-6EBFB5562711">
<File Id ="FILE_IFC4X3_XSD" Name="IFC4X3.xsd" Source="$(var.ProjectDir)..\Program Files to Install\IFC4X3.xsd" KeyPath="yes" />
</Component>
<Component Id = "COMP_IFC_Shared_Parameters_RevitIFCBuiltIn_ALL_TXT" Guid="BD6EB78A-7AED-40C3-9B24-AA74652A3C25">
<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" />
</Component>
Expand Down
2 changes: 1 addition & 1 deletion Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ProductVersion>3.8</ProductVersion>
<ProjectGuid>7dfbd495-c588-4c7b-b8f6-5b793adb06f2</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>IFC for Revit 2023.1.1.0</OutputName>
<OutputName>IFC for Revit 2023.2.3.0</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
Expand Down
8 changes: 4 additions & 4 deletions Install/RevitIFCSetupWix/buildInstaller.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ rem It is necessary to add the Wix bin directory to the system path temporarily
SET PATH=%PATH%;%WixRoot%

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

copy RevitIFC2023.msi %1..\Releasex64
del RevitIFC2023.msi
copy RevitIFC2023.2.3.msi %1..\Releasex64
del RevitIFC2023.2.3.msi

echo %1..\Releasex64\RevitIFC2023.msi
echo %1..\Releasex64\RevitIFC2023.2.3.msi
31 changes: 17 additions & 14 deletions Source/IFCExporterUIOverride/IFCCommandOverrideApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using Autodesk.Revit.UI.Events;
using Revit.IFC.Common.Extensions;
using Revit.IFC.Common.Utility;
using Revit.IFC.Export.Utility;
using Autodesk.Revit.DB.ExternalService;


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

// Prompt the user for the file location and path
string defaultExt = mainWindow.DefaultExt;
String fullName = mainWindow.ExportFilePathName;
String path = Path.GetDirectoryName(fullName);
String fileName = multipleFiles ? Properties.Resources.MultipleFiles : Path.GetFileName(fullName);

string fullName = mainWindow.ExportFilePathName;
string path = Path.GetDirectoryName(fullName);
string fileName = multipleFiles ? Properties.Resources.MultipleFiles : Path.GetFileName(fullName);

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

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

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

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

// get the link instances
List<RevitLinkInstance> currRvtLinkInstances = rvtLinkNamesToInstancesDict[linkPathName];
IList<string> serTransforms = new List<string>();
IList<string> linkFileNames = new List<string>();
IList<Tuple<ElementId, string>> serTransforms = new List<Tuple<ElementId, string>>();

Document linkDocument = null;
double lengthScaleFactorLink = 1.0;
Expand Down Expand Up @@ -557,14 +557,14 @@ public void ExportLinkedDocuments(Autodesk.Revit.DB.Document document, string fi
}

// get the link file path and name
String linkFileName = GetLinkFileName(linkDocument, linkPathName);
string linkFileName = GetLinkFileName(linkDocument, linkPathName);

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

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

// serialize transform
serTransforms.Add(SerializeTransform(tr));
serTransforms.Add(Tuple.Create(currRvtLinkInstance.Id, SerializeTransform(tr)));
}

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

for (int ind = 0; ind < numLinkInstancesToExport; ind++)
{
string optionName = (ind == 0) ? "ExportLinkInstanceTransform" : "ExportLinkInstanceTransform" + (ind + 1).ToString();
exportOptions.AddOption(optionName, serTransforms[ind]);
string optionName = (ind == 0) ? "ExportLinkId" : "ExportLinkId" + (ind + 1).ToString();
exportOptions.AddOption(optionName, serTransforms[ind].Item1.ToString());

optionName = (ind == 0) ? "ExportLinkInstanceTransform" : "ExportLinkInstanceTransform" + (ind + 1).ToString();
exportOptions.AddOption(optionName, serTransforms[ind].Item2);

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

// Pass in the first value; the rest will be in the options.
String path_ = Path.GetDirectoryName(linkFileNames[0]);
String fileName_ = Path.GetFileName(linkFileNames[0]);
string path_ = Path.GetDirectoryName(linkFileNames[0]);
string fileName_ = Path.GetFileName(linkFileNames[0]);
bool result = linkDocument.Export(path_, fileName_, exportOptions); // pass in the options here
}
catch
Expand Down
89 changes: 78 additions & 11 deletions Source/IFCExporterUIOverride/IFCEntityTree/BrowseIFCEntityServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,87 @@ namespace BIM.IFC.Export.UI.IFCEntityTree
{
public class BrowseIFCEntityServer : IIFCEntityTreeUIServer
{
private (bool, string, string) ShowDialogCommon(bool showTypeNodeOnly,
string preSelectEnt, string preSelectPDef, IFCExternalServiceUIData data)
{
EntityTree theTree = new EntityTree(showTypeNodeOnly,
preSelectEntity: preSelectEnt, preSelectPdef: preSelectPDef);

bool? ret = theTree.ShowDialog();
if (ret.HasValue && ret.Value == true)
{
string selEntity = theTree.GetSelectedEntity();
string selPDef = theTree.GetSelectedPredefinedType();
data.IsReset = theTree.isReset;
return (true, selEntity, selPDef);
}

return (false, null, null);
}

/// <summary>
/// Launch the IFC Entity tree browser
/// Launches the IFC Entity tree browser.
/// </summary>
/// <param name="data"></param>
/// <returns>status</returns>
/// <param name="data">The IFCExternalServiceUIData from the native code.</param>
/// <returns>The return status of the dialog window.</returns>
public bool ShowDialog(IFCExternalServiceUIData data)
{
HashSet<string> assignedEntities = new HashSet<string>();
HashSet<string> assignedPredef = new HashSet<string>();
string preSelectEnt = null;
string preSelectPDef = null;

Document document = data.Document;
if (document == null)
return false;

if (document.IsFamilyDocument)
{
using (Transaction tr = new Transaction(document))
{
try
{
tr.Start("IFC Entity Selection");
}
catch { }

FamilyManager familyManager = document.FamilyManager;
FamilyType familyType = familyManager.CurrentType;

FamilyParameter exportTypeAs = familyManager?.get_Parameter(BuiltInParameter.IFC_EXPORT_ELEMENT_TYPE_AS);
FamilyParameter exportPredefinedTypeAs = familyManager?.get_Parameter(BuiltInParameter.IFC_EXPORT_PREDEFINEDTYPE_TYPE);

if ((exportTypeAs?.StorageType != StorageType.String) ||
(exportPredefinedTypeAs?.StorageType != StorageType.String))
return false;

preSelectEnt = familyType?.AsString(exportTypeAs);
preSelectPDef = familyType?.AsString(exportPredefinedTypeAs);

(bool ret, string selEntity, string selPDef) =
ShowDialogCommon(true, preSelectEnt, preSelectPDef, data);

if (ret)
{
if (data.ParamId.IntegerValue == (int)BuiltInParameter.IFC_EXPORT_ELEMENT_TYPE_AS)
{
familyManager.Set(exportPredefinedTypeAs, selPDef);
data.SelectedIFCItem = selEntity;
}
else if (data.ParamId.IntegerValue == (int)BuiltInParameter.IFC_EXPORT_PREDEFINEDTYPE_TYPE)
{
familyManager.Set(exportTypeAs, selEntity);
data.SelectedIFCItem = selPDef;
}
}

if (tr.HasStarted())
tr.Commit();

return true;
}
}

foreach (ElementId elemId in data.GetRevitElementIds())
{
Element elem = data.Document.GetElement(elemId);
Expand Down Expand Up @@ -54,7 +124,7 @@ public bool ShowDialog(IFCExternalServiceUIData data)
if (assignedPredef.Count == 1 && !assignedPredef.First().Equals("<null>"))
preSelectPDef = assignedPredef.First();

using (Transaction tr = new Transaction(data.Document))
using (Transaction tr = new Transaction(document))
{
try
{
Expand All @@ -64,15 +134,12 @@ public bool ShowDialog(IFCExternalServiceUIData data)

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

bool? ret = theTree.ShowDialog();
if (ret.HasValue && ret.Value == true)
{
string selEntity = theTree.GetSelectedEntity();
string selPDef = theTree.GetSelectedPredefinedType();
data.IsReset = theTree.isReset;
(bool ret, string selEntity, string selPDef) =
ShowDialogCommon(showTypeNodeOnly, preSelectEnt, preSelectPDef, data);

if (ret)
{
foreach (ElementId elemId in data.GetRevitElementIds())
{
Element elem = data.Document.GetElement(elemId);
Expand Down
Loading

0 comments on commit 066db42

Please sign in to comment.