how to change the dimension attachment location using api

Hi,

How to change the attachment position of dimension through api. Manually can do by dragging the end point of extension lines. How to do it through programming.

Find attached image for reference.

Thanks in advance.

SolidworksApi macros