Skip to main content

Home > blockly > Workspace > getAllBlocks

Workspace.getAllBlocks() method

Find all blocks in workspace. Blocks are optionally sorted by position; top to bottom (with slight LTR or RTL bias).

Signature:

getAllBlocks(ordered?: boolean): Block[];

Parameters

ParameterTypeDescription
orderedboolean(Optional) Sort the list if true.

Returns:

Block[]

Array of blocks.