How to update inter spacing distance between holes automatically?

I have a plate with no of holes in a line. I need a custom dimension style to update automatically when ever the solid part changes. I'm attaching an image for better understanding. Any suggestion? Thanks in advance.

SolidworksDrawings And Detailing