Create dimensions between sleeves up to the nearest grid

Hello,
I’m trying to use Dynamo to create dimensions between sleeves up to the nearest axis or grid. However, I’m unsure where the problem lies as the dimensions are not showing up in Revit.
Could you help me identify where I might be going wrong?
Code: ToClosestGridLines-family.dyn - Google Drive
Many thanks