Creating dimensions in drafting via code

I have successfully created a program using vb.net and journals to receive user inputs and create models as per the input. I now want to create drawings for the models which are created by the program.

The problem I am facing is that, when I record a journal for creating a dimension, several hundred lines of code are generated and I am not able to reuse them for models which are regenerated through the program I created.

I want to know how to create dimensions on-the-fly in drafting which can be reused for several models with varying parameters. Kindly help me out.