how do I get a solidworks sketch dimensional value

in order to use it in another sketch dimension function?

Retreiving the value and setting the function using VB code?

SolidworksApi macros