Hello and welcome to the Question of the Week Series! This week are answering the question:
"What is the difference between Duplicate with References and Duplicate?"
When you right-click on a block, there are two options for copying the block: Duplicate and Duplicate with References.
Duplicate: Will make a copy of the block and make a copy of all blocks referenced in that block.
In this case, think of duplicate as "copy block & nested blocks". Duplicate won't make copies of variable chips. It will create a whole new block and new nested blocks. In the gif above, you can see how Implicit Body_0 becomes Implicit Body_0_copy and Sphere_0 becomes Sphere_0_copy. This is useful for when you want to copy a block set up and be able to change all of the parameters without links back to the original.
When to use: If you want to copy a block you already have and change its block inputs.
Duplicate with References: Will make a copy of the block but use the same referenced blocks (referenced blocks aren't copied)
In this case, it creates a copy of the top-level block, but not any of the nested blocks. The nested blocks are the same block as the original, and therefore will update values when one of them is changed. This is useful for changing parameters on the top-level block while keeping the input the same. You can see that Implicit Body_0 became Implicit Body_0_copy while Sphere_0 remained the same. When using this, don't forget that the inputs are the same to save any mistakes down the road.
When to use: If you want to copy a block but keep the same block inputs.
In both cases, a new block is being created, therefore Duplicate and Duplicate with References are not a recommended substitute for creating a variable.
Do you have questions that need answers? Send your questions to firstname.lastname@example.org or post on our nTop Edu Slack channel. Be sure to title your email: Question of the Week.