ifcopenshell.api.context.edit_context#

Module Contents#

class ifcopenshell.api.context.edit_context.Usecase(file, context, attributes)#

Edits the attributes of an IfcGeometricRepresentationContext

For more information about the attributes and data types of an IfcGeometricRepresentationContext, consult the IFC documentation.

Parameters
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"})
execute(self)#