It seems that the Block.AddLine method is broken due to support for enhanced resolution and metric units.
And it was always a pain to use anyway, with the x and y arguments smashed into a single variable.
Someone came up with a great workaround, to use AddArc instead of AddLine. If the 3 points supplied to the AddArc method are co-linear, you will get a line. And you can turn it into an arc later by using the stretch command and dragging the center point!
The only drawback is that you need to calculate the mid-point from the start and end point of the line, but that is trivial. Here is a function that does this:
Dim midx : midx = (x2 - x1) / 2
Dim midy : midy = (y2 - y1) / 2
Set DrawLine = ActiveView.Block.AddArc(x1,y1,midx,midy,x2,y2)
I learned the trick of using AddArc instead of AddLine today from Roger McNeil in Mentor Support. This works ok. I think though that if the AddLine method is broke, it either should be fixed (and have it use x,y coordinates for each end of the line instead of mashing the x and y arguments into a single variable) or it should be removed.
Thanks for the help.
In recent releases there is an AddLine2 method that is more straightforward than using an arc.
However, the arcs should be visible in the PDF file - are you using File -> Export -> PDF?
Yes, i create a pdf about "Export PDF" button! Maybe a bug?
I use DxDesigner version 9.3.1.