@tomi.kosunen
The code that you would use to change the shape of an object is this:
setobjectshapeindex(model().find("Operator1"),111); // Female
Where "model().find("Operator1")" is the object to change and "111" is the index shape number. You can find (and add shapes) the shape number by going to the View>Media Files menu option. From there you can click on the down arrow for index numbers of shapes that are loaded by default. If your shape is not there (like a female operator) then you can use the Browse button to go to where that shape is and select it. Then you press the Add button to add it to the preloaded shapes and images. It will assign a new shape ID, such as 111, which you can then use in code to change the shape of an object.
As far as changing in the UI, it doesn't seem to like that. It will revert back to a male operator. The way to do that would be to just add another flowitem called "Female" (or something similar).
When trying to change the shape on Reset, there are a lot of places that can overwrite your code if not put in the right place. I found rather than put it in the OnModelReset code area (where it gets overwritten later in the Reset cycle) I put it in the OnRunStart. That way all the Reset code has fired so when you press the Run button, the shape will change at that point.
