You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
data-converter.ts:98 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'value')
at DataConverter.getMetadataEntry (data-converter.ts:98:36)
at DataConverter.getIfcMetadata (data-converter.ts:81:23)
at DataConverter.saveModelData (data-converter.ts:68:36)
at async DataConverter.generate (data-converter.ts:57:5)
at async _FragmentIfcLoader.load (index.ts:82:19)
at async getFragments (fragments.ts:37:12)
at async HTMLInputElement.<anonymous> (+page.svelte:164:19)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
Check that this is a concrete bug. For Q&A join our Community.
Hey @MagicalBloom... but if it's a malformed header (meaning it doesn't follow the IFC schema), don't you think the authoring software is the one that should solve their exporting? We usually try to avoid making adjustments in the parser to include situations where incoming files does not comply with the schema.
Dollar signs in the IFC schema are used to set null attributes in entities. The third attribute in the FILE_NAME entity is used to set the author of the IFC File (usually the one who exported the file). If there is no author specified, then the dollar sign should be used without parentheses... but in case the author is specified, then it should come in the form of an array (thus the parentheses) with the name of the person. That means the following two FILE_NAME entities comply with the requirements:
In conclusion, the problem with the header from Cadmatic, is that the use of parentheses around the dollar sign in the third attribute is incorrect. I would then suggest you two things:
Look at the Cadmatic settings to specify an author of the IFC file. By doing that, hopefully, the third attribute in the FILE_NAME entity gets correctly exported.
If you're a Cadmatic customer, then talk with them about it.
Of course the software should fix their exporting to match the IFC schema but maybe you could handle the error and tell the library user that supplied IFC-file had malformed headers, or do you expect that parser will always get perfect input? I'm not using Cadmatic myself I just got this file from a client.
Thanks a lot for the explanation about the IFC schema though! I'll send mail to Cadmatic about the problem and hopefully it'll get fixed at some point.
Activity
HoyosJuan commentedon Dec 13, 2023
Hey @MagicalBloom... but if it's a malformed header (meaning it doesn't follow the IFC schema), don't you think the authoring software is the one that should solve their exporting? We usually try to avoid making adjustments in the parser to include situations where incoming files does not comply with the schema.
Dollar signs in the IFC schema are used to set null attributes in entities. The third attribute in the FILE_NAME entity is used to set the author of the IFC File (usually the one who exported the file). If there is no author specified, then the dollar sign should be used without parentheses... but in case the author is specified, then it should come in the form of an array (thus the parentheses) with the name of the person. That means the following two FILE_NAME entities comply with the requirements:
FILE_NAME ('filename.ifc', '2023-09-07T18:44:01', $, ('CADMATIC Oy'), $, $, $);FILE_NAME ('filename.ifc', '2023-09-07T18:44:01', ('MagicalBloom', '[email protected]'), ('CADMATIC Oy'), $, $, $);In conclusion, the problem with the header from Cadmatic, is that the use of parentheses around the dollar sign in the third attribute is incorrect. I would then suggest you two things:
Please, let me know if this answer helps you!
MagicalBloom commentedon Dec 13, 2023
Of course the software should fix their exporting to match the IFC schema but maybe you could handle the error and tell the library user that supplied IFC-file had malformed headers, or do you expect that parser will always get perfect input? I'm not using Cadmatic myself I just got this file from a client.
Thanks a lot for the explanation about the IFC schema though! I'll send mail to Cadmatic about the problem and hopefully it'll get fixed at some point.
HoyosJuan commentedon Dec 21, 2023
Solved in PR #229.