diff --git a/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll b/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll
index c36d66b0..c4f7016d 100644
Binary files a/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll and b/Install/Program Files to Install/Autodesk.SteelConnections.ASIFC.dll differ
diff --git a/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm b/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm
index a92e177e..860c9a02 100644
--- a/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm
+++ b/Install/Program Files to Install/bundle/Contents/Resources/ADSKIFCExporterHelp.htm
@@ -237,6 +237,24 @@
Support Information
Version History
+
23.4.1.0
+
+ General:
+
+
This is the minor update of IFC Exporter for Revit 2023.
+
+
+
+
+ Improvements:
+
+
Fixed an unexpected export error using RCE.
+
Implemented an option that allows to export type properties along with instance properties.
+
Newtonsoft.Json version updated.
+
+
+
+
23.4.0.0
General:
diff --git a/Install/Program Files to Install/bundle/PackageContents.xml b/Install/Program Files to Install/bundle/PackageContents.xml
index cdfe9f07..aed5820b 100644
--- a/Install/Program Files to Install/bundle/PackageContents.xml
+++ b/Install/Program Files to Install/bundle/PackageContents.xml
@@ -1,10 +1,10 @@
-
+
-
-
+
+
\ No newline at end of file
diff --git a/Install/RevitIFCSetupWix/Product.wxs b/Install/RevitIFCSetupWix/Product.wxs
index dd711c71..a5dd94e7 100644
--- a/Install/RevitIFCSetupWix/Product.wxs
+++ b/Install/RevitIFCSetupWix/Product.wxs
@@ -2,7 +2,7 @@
-
+
diff --git a/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj b/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj
index cdc5d724..d76e4ea6 100644
--- a/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj
+++ b/Install/RevitIFCSetupWix/RevitIFCSetupWix.wixproj
@@ -6,7 +6,7 @@
3.87dfbd495-c588-4c7b-b8f6-5b793adb06f22.0
- IFC for Revit 2023.4.0.0
+ IFC for Revit 2023.4.1.0Package$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets
diff --git a/Install/RevitIFCSetupWix/buildInstaller.bat b/Install/RevitIFCSetupWix/buildInstaller.bat
index 0eb00fab..c9518f2e 100644
--- a/Install/RevitIFCSetupWix/buildInstaller.bat
+++ b/Install/RevitIFCSetupWix/buildInstaller.bat
@@ -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.4.0.msi product.wixobj -ext WixUIExtension
+light.exe -ext WixUtilExtension -out RevitIFC2023.4.1.msi product.wixobj -ext WixUIExtension
-copy RevitIFC2023.4.0.msi %1..\Releasex64
-del RevitIFC2023.4.0.msi
+copy RevitIFC2023.4.1.msi %1..\Releasex64
+del RevitIFC2023.4.1.msi
-echo %1..\Releasex64\RevitIFC2023.4.0.msi
+echo %1..\Releasex64\RevitIFC2023.4.1.msi
diff --git a/Source/IFCExporterUIOverride/IFCExportConfiguration.cs b/Source/IFCExporterUIOverride/IFCExportConfiguration.cs
index db175ce5..d29cba26 100644
--- a/Source/IFCExporterUIOverride/IFCExportConfiguration.cs
+++ b/Source/IFCExporterUIOverride/IFCExportConfiguration.cs
@@ -193,6 +193,11 @@ public KnownERNames ExchangeRequirement
///
public string ExportUserDefinedPsetsFileName { get; set; } = "";
+ ///
+ /// Whether or not to include type property to the user defined property sets.
+ ///
+ public bool UseTypePropertiesInInstacePSets { get; set; } = false;
+
///
/// True if the User decides to use the Parameter Mapping Table
/// False if the user decides to ignore it
@@ -434,6 +439,7 @@ public static IFCExportConfiguration CreateBuiltInConfiguration(IFCVersion ifcVe
bool materialPsets,
bool schedulesAsPSets,
bool userDefinedPSets,
+ bool useTypePropertiesInInstacePSets,
bool userDefinedParameterMapping,
bool PlanElems2D,
bool exportBoundingBox,
@@ -471,6 +477,7 @@ public static IFCExportConfiguration CreateBuiltInConfiguration(IFCVersion ifcVe
configuration.ExportMaterialPsets = materialPsets;
configuration.ExportSchedulesAsPsets = schedulesAsPSets;
configuration.ExportUserDefinedPsets = userDefinedPSets;
+ configuration.UseTypePropertiesInInstacePSets = useTypePropertiesInInstacePSets;
configuration.ExportUserDefinedPsetsFileName = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\" + configuration.Name + @".txt";
configuration.ExportUserDefinedParameterMapping = userDefinedParameterMapping;
diff --git a/Source/IFCExporterUIOverride/IFCExportConfigurationsMap.cs b/Source/IFCExporterUIOverride/IFCExportConfigurationsMap.cs
index d3e8b14a..41254371 100644
--- a/Source/IFCExporterUIOverride/IFCExportConfigurationsMap.cs
+++ b/Source/IFCExporterUIOverride/IFCExportConfigurationsMap.cs
@@ -75,22 +75,22 @@ public void AddBuiltInConfigurations()
{
// These are the built-in configurations. Provide a more extensible means of storage.
// Order of construction: name, version, space boundaries, QTO, split walls, internal sets, 2d elems, boundingBox
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x3CV2, 0, false, false, false, false, false, false, false, false, false, false, includeSteelElements: true));
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x3, 1, false, false, true, false, false, false, false, true, false, false, includeSteelElements: true));
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFCCOBIE, 2, true, true, true, false, false, false, false, true, true, false, includeSteelElements: true));
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x3BFM, 1, true, true, false, false, false, false, false, true, false, false, includeSteelElements: true));
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x2, 1, false, false, true, false, false, false, false, false, false, false));
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x3FM, 1, true, false, false, false, true, true, false, true, true, false, includeSteelElements: true));
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC4RV, 0, true, false, false, false, false, false, false, false, false, false, includeSteelElements: true,
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x3CV2, 0, false, false, false, false, false, false, false, false, false, false, false, includeSteelElements: true));
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x3, 1, false, false, true, false, false, false, false, false, true, false, false, includeSteelElements: true));
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFCCOBIE, 2, true, true, true, false, false, false, false, false, true, true, false, includeSteelElements: true));
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x3BFM, 1, true, true, false, false, false, false, false, false, true, false, false, includeSteelElements: true));
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x2, 1, false, false, true, false, false, false, false, false, false, false, false));
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC2x3FM, 1, true, false, false, false, true, true, false, false, true, true, false, includeSteelElements: true));
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC4RV, 0, true, false, false, false, false, false, false, false, false, false, false, includeSteelElements: true,
exchangeRequirement:KnownERNames.Architecture));
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC4RV, 0, true, false, false, false, false, false, false, false, false, false, includeSteelElements: true,
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC4RV, 0, true, false, false, false, false, false, false, false, false, false, false, includeSteelElements: true,
exchangeRequirement:KnownERNames.Structural));
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC4RV, 0, true, false, false, false, false, false, false, false, false, false, includeSteelElements: true,
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC4RV, 0, true, false, false, false, false, false, false, false, false, false, false, includeSteelElements: true,
exchangeRequirement:KnownERNames.BuildingService));
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC4DTV, 0, true, false, false, false, false, false, false, false, false, false, includeSteelElements: true));
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(IFCVersion.IFC4DTV, 0, true, false, false, false, false, false, false, false, false, false, false, includeSteelElements: true));
//Handling the IFC4x3 format for using the IFC Extension with Revit versions older than 2023.1 which does not support IFC4x3.
if(OptionsUtil.IsIFC4x3Supported())
- AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(OptionsUtil.GetIFCVersionByName("IFC4x3"), 0, true, false, false, false, false, false, false, false, false, false, includeSteelElements: true));
+ AddOrReplace(IFCExportConfiguration.CreateBuiltInConfiguration(OptionsUtil.GetIFCVersionByName("IFC4x3"), 0, true, false, false, false, false, false, false, false, false, false, false, includeSteelElements: true));
}
///
@@ -146,6 +146,9 @@ public void AddSavedConfigurations()
Field fieldExportUserDefinedPsetsFileName = m_OldSchema.GetField(s_setupExportUserDefinedPsetsFileName);
if (fieldExportUserDefinedPsetsFileName != null)
configuration.ExportUserDefinedPsetsFileName = configEntity.Get(s_setupExportUserDefinedPsetsFileName);
+ Field fieldUseTypePropertiesInInstacePSets = m_OldSchema.GetField(s_setupUseTypePropertiesInInstacePSets);
+ if (fieldExportUserDefinedPsets != null)
+ configuration.UseTypePropertiesInInstacePSets = configEntity.Get(s_setupUseTypePropertiesInInstacePSets);
Field fieldExportUserDefinedParameterMapingTable = m_OldSchema.GetField(s_setupExportUserDefinedParameterMapping);
if (fieldExportUserDefinedParameterMapingTable != null)
@@ -371,6 +374,7 @@ public void AddSavedConfigurations()
private const string s_setupExportUserDefinedPsetsFileName = "ExportUserDefinedPsetsFileName";
private const string s_setupExportUserDefinedParameterMapping = "ExportUserDefinedParameterMapping";
private const string s_setupExportUserDefinedParameterMappingFileName = "ExportUserDefinedParameterMappingFileName";
+ private const string s_setupUseTypePropertiesInInstacePSets = "UseTypePropertiesInInstacePSets";
private const string s_setupExportLinkedFiles = "ExportLinkedFiles";
private const string s_setupIncludeSiteElevation = "IncludeSiteElevation";
private const string s_setupTessellationLevelOfDetail = "TessellationLevelOfDetail";
diff --git a/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml b/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml
index 949dc327..0b750449 100644
--- a/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml
+++ b/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml
@@ -56,11 +56,12 @@
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml.cs b/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml.cs
index 0c82b567..bf21e931 100644
--- a/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml.cs
+++ b/Source/IFCExporterUIOverride/IFCExporterUIWindow.xaml.cs
@@ -375,6 +375,7 @@ private void UpdateActiveConfigurationOptions(IFCExportConfiguration configurati
checkBoxExportSpecificSchedules.IsChecked = configuration.ExportSpecificSchedules;
checkboxExportUserDefinedPset.IsChecked = configuration.ExportUserDefinedPsets;
userDefinedPropertySetFileName.Text = configuration.ExportUserDefinedPsetsFileName;
+ checkboxUseTypePropertiesInInstacePSets.IsChecked = configuration.UseTypePropertiesInInstacePSets;
checkBoxExportLinkedFiles.IsChecked = configuration.ExportLinkedFiles;
checkboxIncludeIfcSiteElevation.IsChecked = configuration.IncludeSiteElevation;
checkboxStoreIFCGUID.IsChecked = configuration.StoreIFCGUID;
@@ -432,6 +433,7 @@ private void UpdateActiveConfigurationOptions(IFCExportConfiguration configurati
comboboxActivePhase,
checkboxExportUserDefinedPset,
userDefinedPropertySetFileName,
+ checkboxUseTypePropertiesInInstacePSets,
checkBoxExportUserDefinedParameterMapping,
userDefinedParameterMappingTable,
buttonBrowse,
@@ -451,6 +453,7 @@ private void UpdateActiveConfigurationOptions(IFCExportConfiguration configurati
element.IsEnabled = !configuration.IsBuiltIn;
}
comboboxActivePhase.IsEnabled = comboboxActivePhase.IsEnabled && !configuration.VisibleElementsOfCurrentView;
+ checkboxUseTypePropertiesInInstacePSets.IsEnabled = checkboxUseTypePropertiesInInstacePSets.IsEnabled && configuration.ExportUserDefinedPsets;
userDefinedPropertySetFileName.IsEnabled = userDefinedPropertySetFileName.IsEnabled && configuration.ExportUserDefinedPsets;
userDefinedParameterMappingTable.IsEnabled = userDefinedParameterMappingTable.IsEnabled && configuration.ExportUserDefinedParameterMapping;
buttonBrowse.IsEnabled = buttonBrowse.IsEnabled && configuration.ExportUserDefinedPsets;
@@ -1370,6 +1373,23 @@ private void checkboxExportUserDefinedPset_Checked(object sender, RoutedEventArg
configuration.ExportUserDefinedPsets = GetCheckbuttonChecked(checkBox);
userDefinedPropertySetFileName.IsEnabled = configuration.ExportUserDefinedPsets;
buttonBrowse.IsEnabled = configuration.ExportUserDefinedPsets;
+ checkboxUseTypePropertiesInInstacePSets.IsEnabled = configuration.ExportUserDefinedPsets;
+ checkboxUseTypePropertiesInInstacePSets.IsChecked = false;
+ }
+ }
+
+ ///
+ /// Update checkbox for exporting type properties for the instances
+ ///
+ /// The source of the event.
+ /// Event arguments that contains the event data.
+ private void checkboxUseTypePropertiesInInstacePSets_Checked(object sender, RoutedEventArgs e)
+ {
+ CheckBox checkBox = (CheckBox)sender;
+ IFCExportConfiguration configuration = GetSelectedConfiguration();
+ if (configuration != null)
+ {
+ configuration.UseTypePropertiesInInstacePSets = GetCheckbuttonChecked(checkBox);
}
}
diff --git a/Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs b/Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs
index 26ddc942..9a53c271 100644
--- a/Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs
+++ b/Source/IFCExporterUIOverride/Properties/AssemblyInfo.cs
@@ -66,6 +66,6 @@
// The following information is used in the Open Source version as the release version number.
// The number will show up in the Title bar of the export dialog as well as at the IFC header file
// This number must be manually updated prior to releasing the new version
-[assembly: AssemblyVersion("23.4.0.0")]
-[assembly: AssemblyFileVersion("23.4.0.0")]
+[assembly: AssemblyVersion("23.4.1.0")]
+[assembly: AssemblyFileVersion("23.4.1.0")]
#endif
\ No newline at end of file
diff --git a/Source/IFCExporterUIOverride/Properties/Resources.Designer.cs b/Source/IFCExporterUIOverride/Properties/Resources.Designer.cs
index 5d4a7c14..6df25d14 100644
--- a/Source/IFCExporterUIOverride/Properties/Resources.Designer.cs
+++ b/Source/IFCExporterUIOverride/Properties/Resources.Designer.cs
@@ -2517,6 +2517,15 @@ public static string UseTypeNameOnlyForIfcType {
}
}
+ ///
+ /// Looks up a localized string similar to Allow use of type properties in instance property sets.
+ ///
+ public static string UseTypePropertiesInInstacePSets {
+ get {
+ return ResourceManager.GetString("UseTypePropertiesInInstacePSets", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Use visible Revit name as the IFCEntity name.
///
diff --git a/Source/IFCExporterUIOverride/Properties/Resources.resx b/Source/IFCExporterUIOverride/Properties/Resources.resx
index 33818a5f..036ea10d 100644
--- a/Source/IFCExporterUIOverride/Properties/Resources.resx
+++ b/Source/IFCExporterUIOverride/Properties/Resources.resx
@@ -950,4 +950,7 @@
Enter unique template name.
+
+ Allow use of type properties in instance property sets
+
\ No newline at end of file
diff --git a/Source/IFCExporterUIOverride/packages.config b/Source/IFCExporterUIOverride/packages.config
index 4773ee63..281c1455 100644
--- a/Source/IFCExporterUIOverride/packages.config
+++ b/Source/IFCExporterUIOverride/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/Source/Revit.IFC.Common/Properties/AssemblyInfo.cs b/Source/Revit.IFC.Common/Properties/AssemblyInfo.cs
index 96c408e1..8db0cc41 100644
--- a/Source/Revit.IFC.Common/Properties/AssemblyInfo.cs
+++ b/Source/Revit.IFC.Common/Properties/AssemblyInfo.cs
@@ -13,8 +13,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("23.4.0.0")]
-[assembly: AssemblyFileVersion("23.4.0.0")]
+[assembly: AssemblyVersion("23.4.1.0")]
+[assembly: AssemblyFileVersion("23.4.1.0")]
#endif
diff --git a/Source/Revit.IFC.Common/Utility/IfcSchemaEntityTree.cs b/Source/Revit.IFC.Common/Utility/IfcSchemaEntityTree.cs
index d3cc6260..74e3bef7 100644
--- a/Source/Revit.IFC.Common/Utility/IfcSchemaEntityTree.cs
+++ b/Source/Revit.IFC.Common/Utility/IfcSchemaEntityTree.cs
@@ -424,13 +424,18 @@ static public IfcSchemaEntityNode FindNonAbsInstanceSuperType(IFCVersion context
/// This is done in a heuristic fashion, so we will need to
/// make sure exceptions are dealt with.
///
- public static string GetTypeNameFromInstanceName(string instanceName)
+ public static string GetTypeNameFromInstanceName(string instanceName, bool exportAsOlderThanIFC4)
{
// Deal with exceptions.
if (string.Compare(instanceName, "IfcProduct", true) == 0)
return "IfcTypeProduct";
else if (string.Compare(instanceName, "IfcObject", true) == 0)
return "IfcTypeObject";
+ // IFCDoorType and IFCWindowType are available since IFC4.
+ else if (string.Compare(instanceName, "IfcWindow", true) == 0 && exportAsOlderThanIFC4)
+ return "IfcWindowStyle";
+ else if (string.Compare(instanceName, "IFCDoor", true) == 0 && exportAsOlderThanIFC4)
+ return "IFCDoorStyle";
return instanceName + "Type";
}
@@ -455,8 +460,12 @@ static public IfcSchemaEntityNode FindNonAbsInstanceSuperType(string context, st
return res;
}
+
+ bool schemaOlderThanIFC4 = context.Equals(Ifc2x3Schema, StringComparison.InvariantCultureIgnoreCase)
+ || context.Equals(Ifc2x2Schema, StringComparison.InvariantCultureIgnoreCase);
+
string theTypeName = typeName.EndsWith("Type", StringComparison.CurrentCultureIgnoreCase) ?
- typeName : GetTypeNameFromInstanceName(typeName);
+ typeName : GetTypeNameFromInstanceName(typeName, schemaOlderThanIFC4);
IfcSchemaEntityNode entNode = ifcEntitySchemaTree.Find(theTypeName);
if (entNode != null)
diff --git a/Source/Revit.IFC.Export/Exporter/BodyExporter.cs b/Source/Revit.IFC.Export/Exporter/BodyExporter.cs
index 6843a8a7..743db56e 100644
--- a/Source/Revit.IFC.Export/Exporter/BodyExporter.cs
+++ b/Source/Revit.IFC.Export/Exporter/BodyExporter.cs
@@ -22,8 +22,6 @@
using System.Linq;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.IFC;
-using Autodesk.Revit.DB.Mechanical;
-using Autodesk.Revit.DB.Plumbing;
using Revit.IFC.Export.Properties;
using Revit.IFC.Export.Toolkit;
using Revit.IFC.Export.Utility;
@@ -2841,6 +2839,11 @@ private static bool ExportBodyAsSolid(ExporterIFC exporterIFC, Element element,
}
}
currentFaceHashSetList.Add(currentFaceSet);
+
+ // Call GC.KeepAlive(solidFacetation) at this point to maintain a reference to solidFacetation
+ // and prevent the object deletion by the garbage collector after try-catch block.
+ GC.KeepAlive(solidFacetation);
+
return true;
}
diff --git a/Source/Revit.IFC.Export/Exporter/ExporterInitializer.cs b/Source/Revit.IFC.Export/Exporter/ExporterInitializer.cs
index a96a1856..4463369a 100644
--- a/Source/Revit.IFC.Export/Exporter/ExporterInitializer.cs
+++ b/Source/Revit.IFC.Export/Exporter/ExporterInitializer.cs
@@ -313,6 +313,7 @@ private static void InitUserDefinedPropertySets(IList m_Entries = new List();
+ ///
+ /// Determines whether properties from the element's type should be added to the instance.
+ ///
+ public bool AddTypePropertiesToInstance { get; set; }
+
///
/// The entries stored in this property set description.
///
@@ -186,7 +191,7 @@ public ISet ProcessEntries(IFCFile file, ExporterIFC exporterIFC,
{
try
{
- IFCAnyHandle propHnd = entry.ProcessEntry(file, exporterIFC, Name, ifcParams, elementOrConnectorToUse, elemTypeToUse, handle, lookInType);
+ IFCAnyHandle propHnd = entry.ProcessEntry(file, exporterIFC, Name, ifcParams, elementOrConnectorToUse, elemTypeToUse, handle, lookInType, AddTypePropertiesToInstance);
if (IFCAnyHandleUtil.IsNullOrHasNoValue(propHnd) && ExporterCacheManager.ExportOptionsCache.PropertySetOptions.ExportMaterialPsets)
propHnd = MaterialBuildInParameterUtil.CreateMaterialPropertyIfBuildIn(Name, entry.PropertyName, entry.PropertyType, elementOrConnectorToUse?.Element, file);
diff --git a/Source/Revit.IFC.Export/Exporter/PropertySet/PropertySetEntry.cs b/Source/Revit.IFC.Export/Exporter/PropertySet/PropertySetEntry.cs
index c380aeee..9e61140b 100644
--- a/Source/Revit.IFC.Export/Exporter/PropertySet/PropertySetEntry.cs
+++ b/Source/Revit.IFC.Export/Exporter/PropertySet/PropertySetEntry.cs
@@ -441,10 +441,11 @@ private IFCAnyHandle CreateTextPropertyFromCombinedParameterData(IFCFile file, E
/// The element type of which this property is created for.
/// The handle for which this property is created for.
/// True if it's appropriate to look for value in element type.
+ /// Indicates whether properties from the element's type should be added to the instance.
/// The created property handle.
public IFCAnyHandle ProcessEntry(IFCFile file, ExporterIFC exporterIFC, string owningPsetName,
IFCExportBodyParams extrusionCreationData, ElementOrConnector elementOrConnector,
- ElementType elementType, IFCAnyHandle handle, bool lookInType = false)
+ ElementType elementType, IFCAnyHandle handle, bool lookInType = false, bool addTypePropertiesToInstance = false)
{
// if CombinedParameterData, then we have to recreate the parameter value, since there is no
// API for this.
@@ -459,7 +460,7 @@ public IFCAnyHandle ProcessEntry(IFCFile file, ExporterIFC exporterIFC, string o
IFCAnyHandle propHnd = map.ProcessEntry(file, exporterIFC, owningPsetName,
extrusionCreationData, elementOrConnector, elementType, handle, PropertyType,
PropertyArgumentType, PropertyValueType, PropertyEnumerationType, PropertyName,
- lookInType);
+ lookInType, addTypePropertiesToInstance);
if (propHnd != null)
return propHnd;
}
diff --git a/Source/Revit.IFC.Export/Exporter/PropertySet/PropertySetEntryMap.cs b/Source/Revit.IFC.Export/Exporter/PropertySet/PropertySetEntryMap.cs
index 4fbb477f..36c8a79b 100644
--- a/Source/Revit.IFC.Export/Exporter/PropertySet/PropertySetEntryMap.cs
+++ b/Source/Revit.IFC.Export/Exporter/PropertySet/PropertySetEntryMap.cs
@@ -73,12 +73,13 @@ public PropertySetEntryMap(string revitParameterName, BuiltInParameter builtInPa
/// The type of property.
/// The name of property to create.
/// True if it's appropriate to look for value in element type.
+ /// Indicates whether properties from the element's type should be added to the instance.
/// The created property handle.
public IFCAnyHandle ProcessEntry(IFCFile file, ExporterIFC exporterIFC, string owningPsetName,
IFCExportBodyParams extrusionCreationData, ElementOrConnector elementOrConnector,
ElementType elementType, IFCAnyHandle handle, PropertyType propertyType,
PropertyType propertyArgumentType, PropertyValueType valueType, Type propertyEnumerationType,
- string propertyName, bool lookInType)
+ string propertyName, bool lookInType, bool addTypePropertiesToInstance)
{
IFCAnyHandle propHnd = null;
@@ -93,7 +94,7 @@ public IFCAnyHandle ProcessEntry(IFCFile file, ExporterIFC exporterIFC, string o
Element element = elementOrConnector.Element;
propHnd = CreatePropertyFromElementOrSymbol(file, exporterIFC, owningPsetName, element,
elementType, propertyType, propertyArgumentType, valueType, propertyEnumerationType,
- propertyName, lookInType);
+ propertyName, lookInType, addTypePropertiesToInstance);
}
}
@@ -1091,10 +1092,11 @@ private static bool CollectTableDataFromElement(Element element, string revitPar
/// The element.
/// The element type, if it is appropriate to look in it for value.
/// True if it's appropriate to look for value in element type.
+ /// Indicates whether properties from the element's type should be added to the instance.
/// The property handle.
IFCAnyHandle CreatePropertyFromElementOrSymbol(IFCFile file, ExporterIFC exporterIFC, string owningPsetName, Element element, Element elementType,
PropertyType propertyType, PropertyType propertyArgumentType, PropertyValueType valueType, Type propertyEnumerationType, string propertyName,
- bool lookInType = false)
+ bool lookInType = false, bool addTypePropertiesToInstance = false)
{
// Pset from schedule will be created only on the instance and not on the type (type properties in the schedule will be added into the instance's pset
if ((element is ElementType || element is FamilySymbol) && lookInType)
@@ -1146,7 +1148,7 @@ IFCAnyHandle CreatePropertyFromElementOrSymbol(IFCFile file, ExporterIFC exporte
// Get the property from Type for this element if the pset is for schedule or
// if element doesn't have an associated type (e.g. IfcRoof)
- if (IFCAnyHandleUtil.IsNullOrHasNoValue(propHnd) && (elementType != null) && lookInType)
+ if (IFCAnyHandleUtil.IsNullOrHasNoValue(propHnd) && (elementType != null) && (lookInType || addTypePropertiesToInstance))
return CreatePropertyFromElementOrSymbol(file, exporterIFC, owningPsetName, elementType, null,
propertyType, propertyArgumentType, valueType, propertyEnumerationType, propertyName, false);
diff --git a/Source/Revit.IFC.Export/Properties/AssemblyInfo.cs b/Source/Revit.IFC.Export/Properties/AssemblyInfo.cs
index 22eef481..b9f570cc 100644
--- a/Source/Revit.IFC.Export/Properties/AssemblyInfo.cs
+++ b/Source/Revit.IFC.Export/Properties/AssemblyInfo.cs
@@ -14,8 +14,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("23.4.0.0")]
-[assembly: AssemblyFileVersion("23.4.0.0")]
+[assembly: AssemblyVersion("23.4.1.0")]
+[assembly: AssemblyFileVersion("23.4.1.0")]
#endif
diff --git a/Source/Revit.IFC.Export/Utility/IFCExportInfoPair.cs b/Source/Revit.IFC.Export/Utility/IFCExportInfoPair.cs
index 626a89b8..a3ee03d1 100644
--- a/Source/Revit.IFC.Export/Utility/IFCExportInfoPair.cs
+++ b/Source/Revit.IFC.Export/Utility/IFCExportInfoPair.cs
@@ -70,7 +70,7 @@ public string PredefinedType
// there are exceptions.
if (m_ExportType == IFCEntityType.UnKnown)
{
- newValidatedPredefinedType = IFCValidateEntry.GetValidIFCPredefinedType(value, IfcSchemaEntityTree.GetTypeNameFromInstanceName(m_ExportInstance.ToString()));
+ newValidatedPredefinedType = IFCValidateEntry.GetValidIFCPredefinedType(value, IfcSchemaEntityTree.GetTypeNameFromInstanceName(m_ExportInstance.ToString(), ExporterCacheManager.ExportOptionsCache.ExportAsOlderThanIFC4));
}
else
{
@@ -324,7 +324,7 @@ public void SetByTypeName(string entityTypeName)
IList instNodes = IfcSchemaEntityTree.FindAllSuperTypes(ifcVersion, entityTypeName, "IfcProduct", "IfcGroup");
foreach (IfcSchemaEntityNode instNode in instNodes)
{
- typeName = IfcSchemaEntityTree.GetTypeNameFromInstanceName(instNode.Name);
+ typeName = IfcSchemaEntityTree.GetTypeNameFromInstanceName(instNode.Name, ExporterCacheManager.ExportOptionsCache.ExportAsOlderThanIFC4);
IfcSchemaEntityNode node = theTree.Find(typeName);
if (node == null)
node = IfcSchemaEntityTree.FindNonAbsInstanceSuperType(ifcVersion, typeName);
diff --git a/Source/Revit.IFC.Export/Utility/PropertySetOptions.cs b/Source/Revit.IFC.Export/Utility/PropertySetOptions.cs
index 2e4cab63..aeb147fa 100644
--- a/Source/Revit.IFC.Export/Utility/PropertySetOptions.cs
+++ b/Source/Revit.IFC.Export/Utility/PropertySetOptions.cs
@@ -187,6 +187,8 @@ public string ExportUserDefinedPsetsFileName
protected set { m_ExportUserDefinedPsetsFileName = value; }
}
+ public bool UseTypePropertiesInInstacePSets { get; set; } = false;
+
///
/// Private default constructor.
///
@@ -222,6 +224,10 @@ public static PropertySetOptions Create(ExporterIFC exporterIFC, ExportOptionsCa
// "ExportUserDefinedPsets" override
propertySetOptions.ExportUserDefinedPsetsOverride = OptionsUtil.GetNamedBooleanOption(options, "ExportUserDefinedPsets");
+ // "UseTypePropertiesInInstacePSets"
+ propertySetOptions.UseTypePropertiesInInstacePSets =
+ OptionsUtil.GetNamedBooleanOption(options, "UseTypePropertiesInInstacePSets").GetValueOrDefault(false);
+
// "ExportUserDefinedPsetsFileName" override
propertySetOptions.ExportUserDefinedPsetsFileName = OptionsUtil.GetNamedStringOption(options, "ExportUserDefinedPsetsFileName");
diff --git a/Source/Revit.IFC.Import.Core/Properties/AssemblyInfo.cs b/Source/Revit.IFC.Import.Core/Properties/AssemblyInfo.cs
index 08bb4648..37d7f974 100644
--- a/Source/Revit.IFC.Import.Core/Properties/AssemblyInfo.cs
+++ b/Source/Revit.IFC.Import.Core/Properties/AssemblyInfo.cs
@@ -13,8 +13,8 @@
[assembly: AssemblyDescription("Revit.IFC.Import.Core")]
[assembly: AssemblyCompany("Autodesk")]
[assembly: AssemblyCopyright("@2012-2023 Autodesk, Inc. All rights reserved.")]
-[assembly: AssemblyVersion("23.4.0.0")]
-[assembly: AssemblyFileVersion("23.4.0.0")]
+[assembly: AssemblyVersion("23.4.1.0")]
+[assembly: AssemblyFileVersion("23.4.1.0")]
// Version information can now be found in Source\Foundation\RevitENU\Version.cs
//
diff --git a/Source/Revit.IFC.Import/Properties/AssemblyInfo.cs b/Source/Revit.IFC.Import/Properties/AssemblyInfo.cs
index 5759071e..598bc67f 100644
--- a/Source/Revit.IFC.Import/Properties/AssemblyInfo.cs
+++ b/Source/Revit.IFC.Import/Properties/AssemblyInfo.cs
@@ -12,8 +12,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("23.4.0.0")]
-[assembly: AssemblyFileVersion("23.4.0.0")]
+[assembly: AssemblyVersion("23.4.1.0")]
+[assembly: AssemblyFileVersion("23.4.1.0")]
#endif
#region Using directives