Requested

Blockly Copy Across Scripts And Multi Selection


Completed
This feature request has been completed. Install the latest ARC Pro to experience the newest features and bug fixes.

Get ARC Pro

As someone that is fairly new to programming, I've been spending a lot of my time using blocky in the script collection.

Currently (that I'm aware of) there's no way to copy a group of blocks over to a new script. Sometimes I have a group of blocks that I might want to use in a group of scripts. While I can move over to Javascript it means that blocky can't be used any more to finish the script.

I'm sure newer people like myself would like the ability to select multiple blocks maybe using the Ctl or shift key. Then be able to copy them and then paste into a new script like you can with Javascript.

Even the ability to clone an existing script, if the above is not possible may help.

Thanks


ARC Pro

Upgrade to ARC Pro

Don't limit your robot's potential – subscribe to ARC Pro and transform it into a dynamic, intelligent machine.

PRO
Synthiam
#1   — Edited

Unfortunately, Blockly is developed by Google. We can add new blocks, but it’s out of our control beyond that. All software that uses Blockly experiences the same challenge.

You can copy multiple blocks within a script. It’s just a little different than you’d think. You have to copy the scope. So temporarily adding a scoop around the blocks and using the duplicate option. It’s documented here under the copy blocks section: https://synthiam.com/Support/Programming/block-coding/Blockly

I suspect they limited copying blocks with the ctrl key because their initiative is to teach programming. If multiple blocks need to be copied, chances are they should be looped or a function. Or, I’m way off base, and it’s a limitation to the UI, lol. The UI is a web browser. Blockly is HTML and JavaScript :)

PRO
Synthiam
#2   — Edited

I googled to see if there was an update for Blockly to have this ability. Funny enough, a million posts are asking Google to add that functionality.

The most recent post and response from Google were from last week (February 3, 2022). They still say no that feature doesn’t exist because of limitations to the UI as I guessed: https://groups.google.com/g/blockly/c/IqDbFXlvqlQ

I’ll keep this feature request open in case they have an update. But it’s out of our hands for the time being

#3  

Ok thanks, I didn't actually know it was a google developed, that actually gives me something else to read.

I was using the "add scope" method around within the script, a little clunky but it works, just saw it would not copy into a new one.  Could a "clone" script be added to the script collection? sometimes I've found that part of something I've already done would be reused in another script.

Maybe this is not best practice, still getting comfortable with things.

PRO
Synthiam
#4  

I could add a clone option if you think it would help :)

PRO
Synthiam
#6  

Okay - work-around for duplicating scripts in script collection will be in the next release

User-inserted image