How do I convert a text project to a blocks project?

I know how to convert a blocks project to a text project, but how do I do a text project to a blocks project?

Converting text projects to blocks projects is not a supported feature of VEXcode IQ.

4 Likes

do you know when it will be one?

Probably never, see this post (which is in response to a question about VEXcode V5 but also applies to IQ):

3 Likes

ok, so if i were to share my code on this, i would probably get a conversion to blocks

I’m curious why you want to do this…

1 Like

i prefer blocks to text, and that is what I am currently using.
i wouldn’t want to switch to text
i have some code sections that are in text. i want to use them without switching

Ok. Every block has a text that directly corresponds with it, but not all text has a block that matches it. That’s the main reason why you can’t go back. Blocks actually has generally been translated to text before compiled by default. The old RobotC Graphical actually has the text version of the code at the bottom of the file if you opened it up in a text editor.

If you’re having trouble getting anything to work, that is something we could help with. Good luck with your conversion.

4 Likes

ohhhh

yes, hopefully in the future, we will see more blocks for text to blocks.

Text to blocks is unlikely to ever be a feature.

1 Like

Text to Blocks will likely never happen - Blocks is a subset of the full API, so trying to render code that does not have a corresponding “block” presents a number of difficulties.

Text in Blocks… well… stay tuned (but not any time soon). :smiley:

10 Likes

One example of a scratch-style programming environment that does text-to-blocks conversion (albeit from Javascript rather than C++) is Microsoft’s MakeCode:

But it’s not magic, if your JS code is even slightly different from what a block would generate, it will put your JS in one big grey block:

Screen Shot 2021-06-04 at 10.33.48 AM

and there are some cases (mostly errors in your JS) when it just gives up altogether:

Screen Shot 2021-06-04 at 10.39.06 AM

but still, a cool and useful feature!

6 Likes

this actually seems nice

1 Like

but this only works for Microsoft’s robots or whatever they made

MakeCode works with a variety of different platforms made by various companies, but VEX IQ is not one of them – I was just offering it as an interesting example of how a similar programming environment handles text-to-blocks conversion.

2 Likes

yes, i believe the only current supported platforms are vexcode iq, robotc, RobotMesh, and EasyC V4