Yes you can control the rotation of an object in 2D with the ROT2 command.
Remember to make the same transformation in 3D with ROTx.
You can generate random angles (with the RND command) but I think you will have to do this in the Master Script so the same value can be used in both the 2D & 3D scripts.
I am not sure if the RND command generates truly random numbers or it repeats the same 'random' series every time it runs.
Search here and I am sure you will find information on it.
NOTE: you will not actually be changing the symbol rotation that you image shows.
You will still be placing the object with a 0° rotation - the script will add extra rotation.
The value you show in you image can only be manipulated by the user at placement of the object, or via API (add-on) scripting.
Barry.
One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10