Skip to main content

create_project_library

Function create_project_library 

Source
pub fn create_project_library(
    tx: &mut Transaction,
    global_id: &str,
    draft: ProjectLibraryDraft<'_>,
    representation_contexts: &[EntityId],
) -> SpatialAuthoringResult<EntityId>
Expand description

Stage an IfcProjectLibrary.

A library holds shared definitions – types, properties, materials – for reuse across projects. It is an IfcContext like IfcProject, not a container, so RepresentationContexts and UnitsInContext sit where a container keeps its placement.

RepresentationContexts is SET [1:?]: absent is legal, present and empty is not.

§Errors

Refuses a malformed GlobalId and an empty representation-context set.