pySimBlocks.project.build_model¶
- pySimBlocks.project.build_model.build_model_from_dict(model: Model, model_data: Dict[str, Any], params_dir: Path | None = None) None[source]¶
Build a Model instance from an already-loaded model dictionary.
Reads the block registry index, instantiates each block described in
model_data, and wires up the connections.- Parameters:
model – The
Modelinstance to populate with blocks and connections.model_data – Model dictionary with
'blocks'and'connections'sections, as produced byload_project_config().params_dir – Directory used to resolve relative file paths in block parameters (e.g. scene files, function files). Passed to each block’s
adapt_paramsclassmethod.
- Raises:
ValueError – If a block type or category is not found in the registry.