mBlock: How to copy code from one project to another?


#1

Hello all,

I’ve written some nice code :wink: in mBlock. How can i copy this to another project to reuse it.
Or do i really have to type it all again?

Thanks!


#2

the .sb2 file has in it a json part with the code that you could probably copy and paste from but you would have to make sure the json structure isn’t broken.


#3

I had the same problem. So I’ve created simple Python script which merges mBlock projects. It’s for free on github https://github.com/OndreVo/sb2merge


#4

Many people use sprites import/export to share code between projects.