ifcopenshell.api.context.edit_context
¶
Module Contents¶
- ifcopenshell.api.context.edit_context.edit_context(file: ifcopenshell.file, context: ifcopenshell.entity_instance, attributes: dict[str, Any]) None ¶
Edits the attributes of an IfcGeometricRepresentationContext
For more information about the attributes and data types of an IfcGeometricRepresentationContext, consult the IFC documentation.
- Parameters:
context (ifcopenshell.entity_instance) – The IfcGeometricRepresentationContext entity you want to edit
attributes (dict) – a dictionary of attribute names and values.
- Returns:
None
- Return type:
None
Example:
model = ifcopenshell.api.context.add_context(model, context_type="Model") # Revit had a bug where they incorrectly called the body representation a "Facetation" body = ifcopenshell.api.context.add_context(model, context_type="Model", context_identifier="Facetation", target_view="MODEL_VIEW", parent=model ) # Let's fix it! ifcopenshell.api.context.edit_context(model, context=body, attributes={"ContextIdentifier": "Body"})