Macro to measure and record distance

Hi all,

I'm quite new to macros and I'm wondering if any one knows how to set up a macro that would be able to open a design table, increment a value by 5, close the design table, then measure the distance between two pre-selected components (essentially the Clearance Verification function) and finally record that value to an excel sheet (a different one from then the design table).



Essentially what I'm trying to do is generate a table that will show the distance between two parts as one of the objects oscillates. I'm then looking to do this in multiple different orientations meaning there are a very high number of repetitions for this procedure (over 30,000).

Being able to automate any part of the procedure would be a great help.

Thanks,

Dan

SolidworksApi macros