API: Adding Dimensions to a sketch segment

Hello, I am new to API and learning API through SolidWorks API help.

I realized if I select a sketch segment and use smart dimension to add a dimension to it, this is the code generated by the macro recorder:

boolstatus = swModel.Extension.SelectByID2("Line1", "SKETCHSEGMENT", 6.37058785000819E-02, 0, -1.0016647562906E-03, False, 0, Nothing, 0)

Dim myDisplayDim As Object

Set myDisplayDim = swModel.AddDimension2(5.96992194749195E-02, 0, -1.94322962720376E-02)

swModel.ClearSelection2 True

Dim myDimension As Object

Set myDimension = swModel.Parameter("D1@Sketch1")

myDimension.SystemValue = 0.1

However, when I play the macro, the process is automatic except for the "unnecessary prompt of the Smart Dimension Dialog box". Whatever the value I put in the dialog box, finally I am getting the required dimension i.e., 0.1. But, how should I avoid the prompt of the Smart Dimension Dialog box?? Is there any code I need to add so that the dialog box automatically fills the assigned value in its text field?

Thank you very much.

Regards

Siva

SolidworksApi macros