Autodesk / revit-ifc

IFC for Revit and Navisworks (2019+)
477 stars 194 forks source link

PR: Export contains parameters not defined in export mapping table #811

Closed kohout-lukas closed 14 hours ago

kohout-lukas commented 1 week ago

Problem Description

Using Revit Export user defined property set option results in invalid IFC. Attached TXT file contains two property sets, both containing one parameter. Parameter Area is exported even though it is not definod. My understanding is that it exports Revit internal parameter HOST_AREA_COMPUTED. Exporter somehow subtracts preifxes in parameter definition and exports it anyway.

See attached files:

  1. In RVT there is no user visible parameter named Area, only through RevitLookup.
  2. In TXT file there is no mapping for parameter Area, only CZ_M2_Area
  3. In IFC file there are both property sets and both parameters. bug IFC_EXPORT_bug.zip

Revit Version

2024.0.x

IFC for Revit Addon Version

24.x.x

Windows Version

11 22H2

denizmaral commented 1 day ago

You mapped CZ_M2_Area to Area in property set CZ_M2. It is about your setting, isn't it?

kohout-lukas commented 1 day ago

Yes, I mapped it like you say. But the element in screenshot does not have CZ_M2_Area, only Area, which is not being mapped and still gets exported.

So I do not think it is about the mapping table. On further investigation, if I change the IFC class in Revit to anything, like IfcColumn, and update the mapping table respectivly, it works as expected. So I guess it might have something to do with higher level IFC classes like IfcElement defined in the mapping table.

denizmaral commented 23 hours ago

Your goal is then something like that:

PropertySet:    CZ_M2   I   IfcElement
CZ_M2_Area  Area
PropertySet:    CZ_M3   I   IfcElement
CZ_M3_Volume    Volume
kohout-lukas commented 17 hours ago

Well, no. TXT file in the post is correct, that is how I want it. In the images below, there are snapshots of element in IFCand RVT. In RVTthere is no parameter CZ_M2_Areaa and yet, it gets exported as seen in IFCsnapshot. IFC RVT

AngelVelezSosa commented 16 hours ago

Can you re-summarize the problem (just for area?) You want a property set for all IfcElement called CZ_M2, and it should have a property called Area that is an area calculation that comes from a Revit parameter called CZ_M2_Area? And it doesn't work, but if you change IfcElement to IfcColumn, it does?

denizmaral commented 15 hours ago

Now I got it. I could not open the file because I don't have Revit 2025 on my computer. You don't see Area parameter in Revit UI but there is an API-Parameter unter parameters that is being mapped to your parameter. Even though you don't assign the user defined parameter to that family, it still creates a property set and take the Area value.

kohout-lukas commented 14 hours ago

Yes, exactly. Thanks.

AngelVelezSosa commented 14 hours ago

That seems by design, unless I am missing something.

kohout-lukas commented 13 hours ago

OK, if it is by desing, can you describe the reasoning behind it? How can parameter you do not define to be exported still be exported?

AngelVelezSosa commented 10 hours ago

You are looking for a parameter called "Area". There is a parameter called "Area" (at least in English), it just isn't visible in the parameters dialog. If you called it anything else, it wouldn't show up. Unless I am missing the issue.