Select to view content in your preferred language

Radius for CircularArc

341
1
12-14-2023 12:13 AM
TorbjørnDalløkken2
Occasional Contributor

Hi. I'm working on migrating a ArcMap Toolbox from VB .NET (ArcObjects) to an ArcGIS Pro Add-In (ArcGIS Pro SDK). In the old code checks some polylines if the line is a "simple line" or if it's a circular arc. If it's a circular arc, I need to get the radius of the arc. In ArcObjects we converted the linesegment into ICircularArc and in this class there's a property for radius. I'm not able to find a similar property in ArcGIS Pro SDK, neither in CircularArc, EllipticArc nor EllipticArcSegment.

How do I calculate or find the radius for a CircularArc?

0 Kudos
1 Reply
GKmieliauskas
Esri Regular Contributor

Hi,

You can use code below:

            double resultRadius = 0;
            if (circularArc.IsCircular)
            {
                resultRadius = Math.Abs(circularArc.SemiMajorAxis);
            }

SemiMajorAxis Property (EllipticArcSegment)—ArcGIS Pro