Finally! The script is in working order. Try it yourself! Below is the dyn file and Revit (2018) sample for you to test on. See if you can use it for spurring other ideas. Thank you!
Door Offset from Walls_v03.dyn (51.4 KB)
DoorOffsetFromWalls_Upload.rvt (2.8 MB)