From your other thread:
I will have to look into converting my VB code in my CAD program to produce incremental IJ.
In my macro, I use polylines instead of arcs, because then I only need to support 1 entity, instead of several. As any arc can quickly be turned into a polyline using PEDIT.
Here's some code I use for finding the incremental IJ locations, using the bulge of the polyline. "Retcoord" are the polyline vertices. I don't know if ProgeCAD has the "AnglefromXaxis" function, but it's easy to calculate if it doesn't.
pi = 4 * Atn(1)
'Define PiBulgeN = Ent.GetBulge(b - 1)
' Get Bulge of current coordinate ' Set G-Word based on Bulge value - G1, G2, G3 If BulgeN = 0 Then
GWord = "G1"
ElseIf BulgeN < 0 Then
GWord = "G2"
ElseIf BulgeN > 0 Then
GWord = "G3"
End If
' Find Center of Arc If BulgeN <> 0 Then 'If Bulge is NOT zero
' First find chord of arc - pythagorean ChordL = Sqr((RetCoord(X) - RetCoord(X - 2)) ^ 2 + (RetCoord(y) - RetCoord(y - 2)) ^ 2)
' Set Start point of Arc as pt1 and End Point as pt2 Pt1(0) = RetCoord(X - 2): Pt1(1) = RetCoord(y - 2): Pt1(2) = 0
Pt2(0) = RetCoord(X): Pt2(1) = RetCoord(y): Pt2(2) = 0
BulgeAngle = (4 * Atn(BulgeN)) * 180 / pi
' included angle - Convert from radians? r = Abs(ChordL / (2 * Sin((4 * Atn(BulgeN)) / 2)))
' Find Radius of Arc ReturnAngle = ThisDrawing.Utility.AngleFromXAxis(Pt1, Pt2)
' Find angle from Start point to Center Point AngleToCenter = ReturnAngle + (pi / 2 - (2 * Atn(BulgeN)))
' Find Center Point CenterPt = ThisDrawing.Utility.PolarPoint(Pt1, AngleToCenter, r)
If GWord = "G3" Then
ILoc = CStr(FormatNumber(Round(CenterPt(0) - RetCoord(X - 2), Precision), Precision, -1, 0, 0))
JLoc = CStr(FormatNumber(Round(CenterPt(1) - RetCoord(y - 2), Precision), Precision, -1, 0, 0))
Else
'G2 ILoc = CStr(FormatNumber(Round(RetCoord(X - 2) - CenterPt(0), Precision), Precision, -1, 0, 0))
JLoc = CStr(FormatNumber(Round(RetCoord(y - 2) - CenterPt(1), Precision), Precision, -1, 0, 0))
End If