Skip to content

Swood Design (SolidWorks) - IFC read error #3182

@toporivskiy

Description

@toporivskiy

I have such a file exported from SW:

ISO-10303-21;
HEADER;
FILE_DESCRIPTION (( 'IFC4' ),'2;1' );
FILE_NAME ('1233.IFC',
     '2023-05-05T21:28:18',
    ( '' ),
    ( '' ),
    'SwIFC',
    'SolidWorks 2022',
    '' );
FILE_SCHEMA (( 'IFC4' ));
ENDSEC;
...
#45 = IFCBUILDINGELEMENTPROXY ( '0qav$il1TEuhWfGjYAIbKE',#2,'\X2\04210442043e0439043a0430\X0\ \X2\041b0432\X0\._S2_kh1_7_Default<Как обработанный>','','\X2\04210442043e0439043a0430\X0\ \X2\041b0432\X0\._S2_kh1_7_Default<Как обработанный>',#47,#46,'33D4F9E3-2F5E-4BA3-BA-36-BF5F4FBA19E3',.ELEMENT. ) ;

When reading a file in Python, I have the following exception:

Traceback (most recent call last):
  File "D:\PyProjects\swood2vp\main.py", line 22, in <module>
    print(model[45])
  File "D:\PyProjects\swood2vp\venv\Lib\site-packages\ifcopenshell\entity_instance.py", line 277, in __repr__
    return repr(self.wrapped_data)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\PyProjects\swood2vp\venv\Lib\site-packages\ifcopenshell\ifcopenshell_wrapper.py", line 4843, in __repr__
    return _ifcopenshell_wrapper.entity_instance___repr__(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Unexpected 'e' at offset 4062

Please, help to understand what is the problem?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions