Skip to content

06_Deleting_Blocks

Ambuild-code edited this page Nov 20, 2020 · 3 revisions

6 Deleting Blocks

Blocks can be removed from the cell with two commands:

deleteBlocksIndices. The variables for this argument are:

  • indices: A list of the indices of the blocks to be deleted.
  • save: This saves all of the deleted blocks so they can be re-added with the restoreBlocks command.

deleteBlocksTypes: This deletes numBlocks of the specified fragment type. The variables for this argument are:

  • fragmentType: the fragmentType, or list of fragmentTypes of the blocks to be removed.
  • numBlocks: This optional variable specifies the number of blocks to remove. If omitted all blocks of the specified fragmentTypes will be removed.
  • multiple: If True, this will remove blocks that contain more than one fragment, if False, this will only remove single-fragment blocks.
  • save: This saves all of the deleted blocks so they can be re-added with the restoreBlocks command.

Clone this wiki locally