The building gadget makes building a large number of blocks all at once extremely easy!
First, ensure the gadget has some energy.
Second, Shift right-click a block in the world to specify the block to build with.
You can choose your Building Mode by holding the settings key. Each mode is described in its appropriate entry in this book. The default mode is Build to Me.
When looking at a block in the world, you'll see a ghostly image of the blocks that will be placed. If you're missing the required items or energy to place these blocks, they will have a red overlay. Right click to place the blocks as shown.
Build Preview

Seeing a preview of what will be built
When you right click, building will begin. Items will be taken out of your inventory to be placed into the world, and any blocks you don't have the necessary item for will be skipped.
Don't forget you can undo if you make a mistake!