IFC export not working

This forum section is only for IFC-related issues
User avatar
joancabeza
Posts: 49
Joined: Tue Apr 03, 2018 5:51 pm
Contact:

Re: IFC export not working

Postby joancabeza » Thu Apr 26, 2018 10:18 am

It failed again.

It appears a window that says:

Export failed - in method 'new_entity_instance',argument 1 of type 'std::string const &'


This is what the report view says:

Traceback (most recent call last):
File "<string>", line 4, in <module>
File "C:\Program Files\FreeCAD 0.17\Mod\Arch\importIFC.py", line 1259, in export
props.append(ifcfile.createIfcPropertySingleValue(prop["key"],None,ifcfile.create_entity(prop["tp"],prop["val"]),None))
File "C:\Program Files\FreeCAD 0.17\bin\lib\site-packages\ifcopenshell\__init__.py", line 106, in create_entity
e = entity_instance(ifcopenshell_wrapper.entity_instance(type))
File "C:\Program Files\FreeCAD 0.17\bin\lib\site-packages\ifcopenshell\ifcopenshell_wrapper.py", line 1252, in __init__
this = _ifcopenshell_wrapper.new_entity_instance(s)
<type 'exceptions.TypeError'>: in method 'new_entity_instance', argument 1 of type 'std::string const &'
App::Document::recompute(): cyclic dependency detected
App::Document::recompute(): cyclic dependency detected
App::Document::recompute(): cyclic dependency detected
App::Document::recompute(): cyclic dependency detected


Another thing: When a I have tried to export simple elements (walls slabs..) the site and building are by default, even if I have different names in FC. It seems it doesn't "remember" this things.
User avatar
yorik
Site Admin
Posts: 11567
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: IFC export not working

Postby yorik » Thu Apr 26, 2018 11:32 pm

hm there I cannot solve it. There is some data that cannot be correctly converted to ifc entities.
Can you either append your freecad file here, or edit the importIFC.py, and add a new line at line 1259 just above the one that begins with "props.append...") that says:

Code: Select all

print prop["key"],prop["tp"],prop["val"]
make sure to add the same amount of spaces so the "print" word starts exactly above "props" below.
Then run the export again, and we'll see what it is trying to do...
User avatar
joancabeza
Posts: 49
Joined: Tue Apr 03, 2018 5:51 pm
Contact:

Re: IFC export not working

Postby joancabeza » Sun Apr 29, 2018 9:31 pm

I've tried to solve it but I suppouse I'm doing something wrong.
Here is what it says:

Traceback (most recent call last):
File "<string>", line 3, in <module>
<type 'exceptions.SyntaxError'>: ('invalid syntax', ('C:\\Users\\CABE\\Desktop\\FreeCAD_0.18.13588_x64_dev_win\\Mod\\Arch\\importIFC.py', 1259, 38, ' print prop["key"],prop["tp"],prop["val"] \n'))


I attach here the FC and Py files. Don't worry about the file itself. I'm using this small project to test FreeCAD. I know that in some point I'would have to start from zero. I'ts just if this can help solving problems exportimg IFC.
1806.FCStd
(338.4 KiB) Downloaded 13 times
importIFC.py
(102.53 KiB) Downloaded 15 times
User avatar
yorik
Site Admin
Posts: 11567
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: IFC export not working

Postby yorik » Mon Apr 30, 2018 6:27 pm

Thanks, I'll look at it. My IfcOpenShell fails to build at the moment, couldn't find out why, but as soon as I get it solved I look into this.
Taufeeq2
Posts: 18
Joined: Fri Mar 30, 2018 12:39 pm

Re: IFC export not working

Postby Taufeeq2 » Sun May 13, 2018 9:31 am

I have followed the tutorial on the freecad website about installung ifcopenshell but i cant find the site packages folder on my ubuntu freecad installation
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: IFC export not working

Postby NormandC » Sun May 13, 2018 7:19 pm

Taufeeq2 wrote:
Sun May 13, 2018 9:31 am
I have followed the tutorial on the freecad website about installung ifcopenshell
Please provide the link so we don't have to waste our time hunting for it.