Here is the question, how to use the script to achieve the rotation of the entity?
When say "use the script" are you are referring to the STAAD input commands? If so, then there is a less-commonly used STAAD command called PERFORM ROTATION which essentially accomplishes the same action. The UI will update the nodal coordinates and remove this command upon saving the file, though. However, this allows you to enter coordinate values in a convenient axes then have the program perform the rotation calculations.
This tool Rotate tool described in this topic in the UI actually changes the coordinates of all nodes based on the rotation parameters given when run. The node coordinates are then changed in the input file, similar to how the UI treats the PERFORM ROTATE command when saved. However, the Rotate tool gives you additional flexibility to rotate about any arbitrary axes, create copies along an arc, and link the copies.
However, if you happen to be referring to OpenSTAAD, there is no means to instruct the program to perform this action through OpenSTAAD at this time.
Jason Coleman, PE
Bentley Systems Senior Manager Technical Content