extracting the dimensions through API

Hi everyone,

I have modelled the knuckle joint (file attached) with three arms in solidworks. I need to extract the following dimensions X1, X2a, X2b, X3a, X3b, X4, X5 using solidworks API (Application programming interface).Can anyone help me in extracting these dimensions.

With regards

Ravi kiran

SolidworksApi macros