IfcOpenShell is an open-source (LGPL) software library providing an API for working with the Industry Foundation Classes (IFC) data model, used in Building Information Modeling (BIM). The `ifcopenshell` Python library offers high-level bindings and utilities for reading, writing, and manipulating IFC files. It is currently at version 0.8.5 and receives updates aligning with the underlying C++ library, with an irregular release cadence.
pip install ifcopenshellVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a new IFC file with a basic 'IfcProject' entity, save it to disk, and then clean up the generated file.
Review the official migration guide for v0.8. Specifically, `ifcopenshell.guid.new()` replaces `ifcopenshell.create_guid()`, and arguments for `ifcopenshell.geom.settings()` have changed.
Always check the `requires_python` metadata on PyPI or the official documentation for the supported Python range. For v0.8.5, this is typically Python 3.10-3.14. If a wheel is unavailable, building from source is an option but significantly more complex.
Use `ifcopenshell.template(schema='IFC4')` for creating new IFC files. This provides better control over the IFC schema and initial setup.
Run `pip install ifcopenshell` in the correct virtual environment. Ensure your Python version is compatible with the latest IfcOpenShell release.
On Windows, install the latest Visual C++ Redistributables. Ensure your Python version matches a pre-built wheel available for your OS and architecture. Check `pip debug` output for more clues or consider using a different Python environment.
Replace `ifcopenshell.create_guid()` with `ifcopenshell.guid.new()` which generates a new GUID without arguments.
If `by_id()` is used, it returns a single object. If `by_type()` might return one, convert to a list: `my_entities = list(ifc_file.by_type('IfcWall'))` or check `if isinstance(entity, list):` before iterating.No dependency data recorded yet.