2

If I have a Blockly workspace, how can I get the total number of blocks that are being used?

user12976477
  • 57
  • 1
  • 7

1 Answers1

1

workspace.getAllBlocks(false).length

Docs: https://developers.google.com/blockly/reference/js/Blockly.Workspace#getAllBlocks

Neil Fraser
  • 993
  • 1
  • 7
  • 12