code: start a python shell
Code: Select all
import sys, os
sys.path.append('C:/0_BHA_privat/progr/FreeCAD_0.19.xxxxx_Py3Qt5/bin') # FreeCAD
#sys.path.append('C:/0_BHA_privat/progr/FreeCAD_0.19.xxxxx_Py3Qt5/bin/Lib/site-packages') # IfcOpenShell
ifcfilepath = os.path.join(os.path.expanduser('~'), 'Desktop', 'column.ifc')
import FreeCAD, Arch, importIFC
FreeCAD.newDocument("mydoc")
col = Arch.makeStructure(None, 400, 400, 2500)
col.Document.recompute()
importIFC.export([col], ifcfilepath)
output:
Code: Select all
>>> import sys, os
>>> sys.path.append('C:/0_BHA_privat/progr/FreeCAD_0.19.xxxxx_Py3Qt5/bin') # FreeCAD
>>> #sys.path.append('C:/0_BHA_privat/progr/FreeCAD_0.19.xxxxx_Py3Qt5/bin/Lib/site-packages') # IfcOpenShell
... ifcfilepath = os.path.join(os.path.expanduser('~'), 'Desktop', 'column.ifc')
>>>
>>> import FreeCAD, Arch, importIFC
>>> FreeCAD.newDocument("mydoc")
<Document object at 000002521844ADE0>
>>> col = Arch.makeStructure(None, 400, 400, 2500)
>>> col.Document.recompute()
1
>>> importIFC.export([col], ifcfilepath)
>>>
but import ifcopenshell gives an error:
Code: Select all
>>> import ifcopenshell
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ifcopenshell'
>>>
But ther should be an errormessage, but for some reason it is not printed ! https://github.com/FreeCAD/FreeCAD/blob ... C.py#L1502
Could someone confirm this?