add Coordinate Dimensions

Pioneer
Pioneer
Hi ,
I just want to add coordinate dimension in drawing view. Just consider one rectangular object in drawing view, 1st line is coordinate origin, and I want to add coordinate dimension for remaining 3 lines.

App=Marshal. Getactiveobject("solid edge.application)



Doc=app.activedocument

Sheet=doc.activesheet

Views=sheet.drawingviews

View=views.item(1)

Lines2d = view.dvlines2d

Dims=sheet.dimensions


Line2d1=lines2d.item(1)

Dim a,b,c,d as double

Line2d1.getstartpoint(a,b)

dims.addcoordinateorigin(line2d1,a,b,0,true)

for I=2 to lines2d.count



Line2d=lines2d.item(i)


Line2d.getstartpoint(c,d)

dims.addcoordinate(Line2d1,a,b,0,true,line2d,c,d,0,true)




Next

Endsub



While running this code, it consider all start points as zero,
Second thing
All the dimensions are added on lower left corner of the sheet...


can you help me for this problem


Thanks

Balaji