Argument PredefinedType not found on IfcRoot

This forum section is only for IFC-related issues
Post Reply
User avatar
Wilson
Posts: 28
Joined: Fri Jul 13, 2018 6:50 pm
Location: Portugal
Contact:

Argument PredefinedType not found on IfcRoot

Post by Wilson »

Hi there!!

I installed FreeCAD on a new computer and I'm trying to export a file to IFC (the Mies Pavillion, that yorik teaches in his youtube channel).

I select the site, go to file, export and then I get this message whenever I try to export it: "Argument PredefinedType not found on IfcRoot". Here's the error message in the Python console:

Code: Select all

Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "C:\Program Files\FreeCAD 0.18\Mod\Arch\importIFC.py", line 1832, in export
    product = getattr(ifcfile,"create"+ifctype)(**kwargs)
  File "C:\Program Files\FreeCAD 0.18\bin\lib\site-packages\ifcopenshell\file.py", line 66, in create_entity
    [(e.wrapped_data.get_argument_index(name), arg) for name, arg in kwargs.items()]
  File "C:\Program Files\FreeCAD 0.18\bin\lib\site-packages\ifcopenshell\file.py", line 66, in <listcomp>
    [(e.wrapped_data.get_argument_index(name), arg) for name, arg in kwargs.items()]
  File "C:\Program Files\FreeCAD 0.18\bin\lib\site-packages\ifcopenshell\ifcopenshell_wrapper.py", line 1985, in get_argument_index
    return _ifcopenshell_wrapper.entity_instance_get_argument_index(self, a)
<class 'RuntimeError'>: Argument PredefinedType not found on IfcRoot
I tried to change FC default language (it was in portuguese, by default) but it didn't fix it. By the way, in the IFC preferences, I do have "IfcProduct" in the Root Element box.

Attached you can find a printscreen and here is a link with the file, for download: https://drive.google.com/file/d/1MiN1sg ... sp=sharing

Thanks in advance to anyone helping :)

Here's my other data:

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16131 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Portuguese/Portugal (pt_PT)
Attachments
freecad error.png
freecad error.png (203.23 KiB) Viewed 1519 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Argument PredefinedType not found on IfcRoot

Post by vocx »

Wilson wrote: Tue Sep 17, 2019 1:14 pm I select the site, go to file, export and then I get this message whenever I try to export it: "Argument PredefinedType not found on IfcRoot". Here's the error message in the Python console:

Code: Select all

Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "C:\Program Files\FreeCAD 0.18\Mod\Arch\importIFC.py", line 1832, in export
    product = getattr(ifcfile,"create"+ifctype)(**kwargs)
  File "C:\Program Files\FreeCAD 0.18\bin\lib\site-packages\ifcopenshell\file.py", line 66, in create_entity
...
This specific error seems to occur not in FreeCAD itself, but in the IfcOpenShell libraries, which are responsible for handling the Ifc data. Maybe during the packaging of the file, there was some mismatch between the Arch iftype, and the ifcopenshell types.

Is it possible for you to try the 0.19 version in Windows? Just to see if that is working.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Wilson
Posts: 28
Joined: Fri Jul 13, 2018 6:50 pm
Location: Portugal
Contact:

Re: Argument PredefinedType not found on IfcRoot

Post by Wilson »

thanks for your reply vocx. I downloaded FC 0.19 but now I have a different error message: "Unable to find find keyword in schema"

Code: Select all

Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "C:\Users\wilso\Desktop\FreeCAD_0.19.18234_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Arch\exportIFC.py", line 398, in export
    product = getattr(ifcfile,"create"+ifctype)(**kwargs)
  File "C:\Users\wilso\Desktop\FreeCAD_0.19.18234_x64_LP_12.1.2_PY3QT5-WinVS2015\bin\lib\site-packages\ifcopenshell\file.py", line 62, in create_entity
    e = entity_instance(type)
  File "C:\Users\wilso\Desktop\FreeCAD_0.19.18234_x64_LP_12.1.2_PY3QT5-WinVS2015\bin\lib\site-packages\ifcopenshell\entity_instance.py", line 55, in __init__
    e = ifcopenshell_wrapper.new_IfcBaseClass(e)
  File "C:\Users\wilso\Desktop\FreeCAD_0.19.18234_x64_LP_12.1.2_PY3QT5-WinVS2015\bin\lib\site-packages\ifcopenshell\ifcopenshell_wrapper.py", line 2163, in new_IfcBaseClass
    return _ifcopenshell_wrapper.new_IfcBaseClass(s)
<class 'RuntimeError'>: Unable to find find keyword in schema
Attachments
FreeCAD error.png
FreeCAD error.png (192.97 KiB) Viewed 1475 times
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: Argument PredefinedType not found on IfcRoot

Post by Syres »

Having had a quick look at the code, is it not the case that if the IFC exporter comes across an object in the tree under Site that has an IFC Type as Undefined in the Data tab it will produce this error?
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Argument PredefinedType not found on IfcRoot

Post by yorik »

There has been some back-and-forth in the source code about that "Undefined" IFC type, @Moult had removed it but I insisted to have it back (I find important to be able to specifically say the IFC type of an object is undefined, so you know which objects you haven't specified yet). So maybe your version of FreeCAD is just one that had that problem. I must recompile FreeCAD (been one month without using it :) ) and I'll test
Post Reply