Fix #4383. Demo library should use Model/Annotation/MODEL_VIEW for text annotations so that they can be used anywhere, not just on plans.

This commit is contained in:
Dion Moult
2024-03-03 16:12:18 +11:00
parent cf9d3026f4
commit 48d6cc8a28
3 changed files with 157 additions and 157 deletions
@@ -57,12 +57,12 @@ class LibraryGenerator:
target_view="PLAN_VIEW",
parent=plan,
),
"plan_annotation": ifcopenshell.api.run(
"model_annotation": ifcopenshell.api.run(
"context.add_context",
self.file,
context_type="Plan",
context_type="Model",
context_identifier="Annotation",
target_view="PLAN_VIEW",
target_view="MODEL_VIEW",
parent=plan,
),
}
@@ -194,8 +194,8 @@ class LibraryGenerator:
))
representation = self.file.createIfcShapeRepresentation(
self.representations["plan_annotation"],
self.representations["plan_annotation"].ContextIdentifier,
self.representations["model_annotation"],
self.representations["model_annotation"].ContextIdentifier,
"Annotation2D",
items,
)