Label curve Chord Length and Bearing

I am looking for a macro to label an arc, specifically the Chord Length and the Chord Bearing. I found one that someone made on here a while back that labels most properties of the arc but not the Chord.

I am new to vba writing and am struggling mightily to get the chord to come in.

Any help would be appreciated.

V8i SS2

  • A picture is worth 1,000 words. Please post a screen-shot, or small DGN model, that illustrates what you want to measure.

    The VBA ArcElement object has properties Length, StartPoint and EndPoint. If by 'chord' you mean the vector from start to end, then you can construct a new Vector3d using Vector3dSubtractPoint3dPoint3d.

    Dim oArc As ArcElement
    ... get oArc from somewhere
    Dim length As Double
    length = oArc.Length
    Dim azimuth As Vector3d
    azimuth = Vector3dSubtractPoint3dPoint3d ( _
          oArc.StartPoint, oArc.EndPoint)
    Dim north As Vector3d
    north = Vector3dFromXY (0, 1)
    Dim radians AS Double
    radians = Vector3dAngleBetweenVectorsXY (azimuth, north)
    Debug.Print "Bearing=" & CStr (Degrees (radians))

    Regards, Jon Summers
    LA Solutions

    Regards, Jon Summers
    LA Solutions