Copying blocks
  • 08 Jun 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Copying blocks

  • Dark
    Light
  • PDF

Article summary

It’s important to understand how the copying of blocks feature works in Buildabot.

When you copy a block (or node as it’s also known), you will copy everything in that entire node (think of this as a branch of a tree). So this means everything from the block you’ve copied and everything attached to that block downstream in the flow.

When you try to paste it onto another node, it will paste everything you copied.

TIP!

You can copy and paste blocks/nodes between bots. To do this, simply open the bot you want to copy a node from, copy it and then return to the bot where you’d like to paste the node. 

This is useful if you want to recycle functionality you’ve already built in another bot to save yourself some time.


Here’s how this works:


STEP 1: Move your mouse cursor over the block you’d like to copy – you will see a little toolbar appear.


STEP 2: Click on the “Copy” icon which looks like this:

You will get a message appearing in the top right corner of the editor indicating that your block was successfully copied like this:

CAUTION!
When you copy a node, remember that you are copying the block you’ve clicked the “copy” icon on as well as all its attached blocks down the branch.

STEP 3: Click on the “Paste” icon. See below for the components you will interact with as part of this process.

To paste the blocks you copied, mouse over the block/node where you’d like to paste the blocks:

You will now see 2 icons on that block.

This icon allows you to add a new block onto the node.

This icon means you can paste the node of blocks you copied in STEP 2 earlier.

Once clicked, the blocks you copied will now appear where you’ve pasted them:


Take a look at how this is done with his example here:

Now that we’ve looked at how you use the block builder to add blocks, we’ll take a look at deleting blocks.

Recommended next article...

Bot Builder | How to... | Deleting blocks