Fix add entity with id

This commit is contained in:
Thomas Krijnen
2026-01-14 14:02:10 +01:00
parent 136befde86
commit 64bf807baa
+2 -2
View File
@@ -238,12 +238,12 @@ private:
return s.str();
}
express::Base create(const std::string& entity_name) {
express::Base create(const std::string& entity_name, int id=-1) {
const IfcParse::declaration* decl = $self->schema()->declaration_by_name(entity_name);
if (!decl || !(decl->as_entity() || decl->as_type_declaration())) {
throw IfcParse::IfcException("No such entity or type declaration: '" + entity_name + "' in schema '" + $self->schema()->name());
}
return $self->create(decl);
return $self->create(decl, id);
}
std::vector<unsigned> entity_names() const {