lynx.Diagram.add_block¶
- Diagram.add_block(block_type: str, id: str, position: Dict[str, float] | None = None, **kwargs: Any) Block[source]¶
Add a block to the diagram.
- Parameters:
block_type – Type of block (“gain”, “io_marker”)
id – Unique identifier for the block
position – Optional canvas position
**kwargs – Block-specific parameters (including optional ‘label’)
- Returns:
The created Block object
- Raises:
ValueError – If block type is unknown or id already exists