If you only want to round to a whole number, activating or deactivating and reactivating the Integral coordinates more should help.
If you wanted to change selected shape to snap to a custom grid (when a script is run), it should be possible via the VectorImage interface. The script would first need to use GetIDsFromState to access the selected shape and then use GetElementToolID to find out what kind of element it is (ellipse, rectangle, ...) and then read and analyze its parameters GetElementToolParams, change them and finally use ModifyElement to apply the changes. It will not be trivial.