Note that there is build-in functionlity for this in the Smart Client that will probably work much better than a plug-in can.
If the server is XProtect Corporate, Expert or a Plus product you will be able be able to add/remove/edit a PTZ preset using Configuration API method.
https://mymilestone.force.com/developer/s/question/0D50O00003gvDpLSAU/
I think that when you add a PTZ presets like this it might not be available for use in the Smart Client before a re-login of the Smart Client, the configuration will have to be renewed. I have not experimented so I am not hundred percent sure but this is my guess.