The file was originally downloaded from http://hilti.cadclick.com/ The funny thing is the file was produced by Yeah IfcOpenShell
Code: Select all
Opening /home/hugo/Desktop/hilti-anchor.ifc...done.
Building relationships table...done.
Processing objects...
1/4 creating object #18 : IfcSite (arch) no brep 2/4 creating object #25 : IfcBuilding (arch) no brep 3/4 creating object #32 : IfcBuildingStorey (arch) no brep 4/4 creating object #34 : IfcDiscreteAccessory (arch)Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Arch/importIFC.py", line 278, in open
doc = insert(filename,doc.Name,skip,only,root)
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Arch/importIFC.py", line 447, in insert
if product.Representation and MERGE_MODE_ARCH == 0 and archobj:
File "/usr/lib/python2.7/dist-packages/ifcopenshell/__init__.py", line 50, in __getattr__
return entity_instance.wrap_value(self.wrapped_data.get_argument(self.wrapped_data.get_argument_index(name)))
File "/usr/lib/python2.7/dist-packages/ifcopenshell/ifcopenshell_wrapper.py", line 853, in get_argument
def get_argument(self, *args): return _ifcopenshell_wrapper.entity_instance_get_argument(self, *args)
<type 'exceptions.RuntimeError'>: Entity not found
Beendet
hugo@weide:~/Documents/dev/freecad/freecadbhb_dev/build$
Code: Select all
hugo@weide:~$ python
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import ifcopenshell
>>> f = ifcopenshell.open("/home/hugo/Desktop/hilti-anchor.ifc")
>>> f.by_type('ifcperson')
[#1=IfcPerson('Hilti','Hilti','Hilti',$,$,$,$,$)]
>>> f.by_id(54)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/ifcopenshell/__init__.py", line 121, in by_id
def by_id(self, id): return self[id]
File "/usr/lib/python2.7/dist-packages/ifcopenshell/__init__.py", line 118, in __getitem__
return entity_instance(self.wrapped_data.by_id(key))
File "/usr/lib/python2.7/dist-packages/ifcopenshell/ifcopenshell_wrapper.py", line 801, in by_id
def by_id(self, *args): return _ifcopenshell_wrapper.file_by_id(self, *args)
RuntimeError: Entity not found
>>>
Code: Select all
hugo@weide:~$ python
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import ifcopenshell
>>> f = ifcopenshell.open("/home/hugo/Desktop/hilti-anchor_fixed.ifc")
>>> f.by_type('ifcperson')
[#1=IfcPerson('Hilti','Hilti','Hilti',$,$,$,$,$)]
>>> f.by_id(54)
#54=IfcPropertySingleValue('Untergrundmaterial',$,IfcText('Beton (gerissen); Beton (ungerissen)'),$)
>>>
>>> f.by_id(53)
#53=IfcPropertySingleValue('Umweltbedingungen',$,IfcText('string was deleted becaus it causes problems'),$)
>>>
>>>
OS: Debian GNU/Linux 8.2 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6185 (Git)
Build type: Debug
Branch: master
Hash: 0b3f60a68c65332d72cf5ac3331bbcde24405b03
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a