Repository navigation
Conversation
Grouped mode names a built-in parameter by its public API name, which several parameters of one group can share, so a property set could hold several properties of one name. IfcPropertySet requires unique names. Grouped sets now follow the rule of the parameter names option: every member of a clash gets " [parameter id]" appended, plus " #n" when the id repeats too. Output without grouping is unchanged. An older grouped test added a parameter id that its element already held, so it now uses another built-in of the same group.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes and why
With
--ifc-revit-parameter-groupsthe IFC export could write one property set with several properties of the sameName. This breaksIfcPropertySet.WR32(IFC2X3) andUniquePropertyNames(IFC4), and a viewer may keep only one of the values.Cause: grouped mode names a built-in parameter by its public API name, and the API definitions in the repository give one name to several parameters of the same group (for example
Top Offset). The suffix rule added in #330 ran only when--ifc-revit-parameter-nameswas set.Grouped sets now use that rule too: every member of a clash gets
[parameter id], followed by#nif the id repeats as well. InExportPropertySetsthis changes one condition.Compatibility: in grouped mode without a names option, a clashing property no longer appears under its plain name, so a lookup by that name does not find it in the affected set. Names that do not clash are unchanged.
How it was checked
dotnet build RvtIO.slnx -c Releasehas no warnings. It succeeds with 0 errors but reports warnings: compiler and analyzer warnings from the test project, and theSystem.IO.Hashingpackage notice for net8.0. No warning names the changed test file.dotnet testpasses. Run asdotnet test RvtIO.slnx -c Release --no-build: net10.0 12229 passed, net8.0 12225 passed, 0 failed, 453 skipped on each.RVTIO_TEST_FILESwas not set, so tests that need private fixtures did not run.Tests. A new test (IFC2X3 and IFC4) covers a clash inside a group, the same name in two groups (no suffix), a unique name (no suffix) and a repeated id (
#n). It failed with duplicate property names before the fix.RevitParameterGroups_WritesApiNamesInGroupPropertySetsadded a parameter id that its test element already held, so it now uses another built-in of the same group.Export comparison, base
59ca1714against this branch, on local models that are not in the repository, with a fixed timestamp:--ifc-revit-parameter-names.IfcRelDefinesByPropertieslinks the same objects to the same sets, and every rooted entity keeps its GlobalId, type and name;IfcPropertySingleValue. The current profile writes a few more of them, which fits renamed properties no longer sharing one cached value.ifcopenshell,express_rules=True), grouped IFC2X3 and IFC4 exports of one model: the duplicate-name violations of the base are gone and no violation is new. The other IFC2X3 violations of the base are unchanged._Nproperty sets: the split into chunks applies only to the ungrouped list.