Is it possible to ask Autocad developper team how they managed to make element snapping and implement them in Revit? Simple but highly useful and may be easier as it is already an Autodesk knowledge.
https://www.cadtutor.net/tutorials/autocad/object-snap.php