“cmd.get_position” returns the 3D coordinates of the center of the viewer window.
def get_position(quiet=1):
get_position | api