(Moved to Ruby API category.)
Also see this thread: Is there anyway to open the Geo-location->Add location dialog by ruby?