ifcopenshell.api.context.edit_context
¶
Module Contents¶
- ifcopenshell.api.context.edit_context.edit_context(file, context, attributes) 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, optional) – a dictionary of attribute names and values.
- Returns:
None
- Return type:
None
Example:
model = ifcopenshell.api.run("context.add_context", model, context_type="Model") # Revit had a bug where they incorrectly called the body representation a "Facetation" body = ifcopenshell.api.run("context.add_context", model, context_type="Model", context_identifier="Facetation", target_view="MODEL_VIEW", parent=model ) # Let's fix it! ifcopenshell.api.run("context.edit_context", model, context=body, attributes={"ContextIdentifier": "Body"})