Creating associative dimensions in runtime

I would like to know if there is an api method using which I can create associative dimensions? I'm working on a project in which a shaft is being fully created by the program and a drawing needs to be made for the same, with the dimensions of steps and diameters. This was already done in Unigraphics and now it needs to be done in Solidworks as well! I appricaiate your response!

Thanks,

Abbas

www.quest-global.com

SolidworksApi macros