public EllipticArcSegment ToSegment()
Public Function ToSegment() As EllipticArcSegment
Return Value
An EllipticArc segment.
public EllipticArcSegment ToSegment()
Public Function ToSegment() As EllipticArcSegment
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
// Construct a circular arc from (2, 1) to (1, 2) with interior pt (1 + sqrt(2)/2, 1 + sqrt(2)/2). // Use a builder convenience method or use a builder constructor. MapPoint fromPt = MapPointBuilder.CreateMapPoint(2, 1); MapPoint toPt = MapPointBuilder.CreateMapPoint(1, 2); Coordinate2D interiorPt = new Coordinate2D(1 + Math.Sqrt(2) / 2, 1 + Math.Sqrt(2) / 2); // Builder convenience methods don't need to run on the MCT. EllipticArcSegment circularArc = EllipticArcBuilder.CreateEllipticArcSegment(fromPt, toPt, interiorPt); // Builder constructors need to run on the MCT. ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => { using (EllipticArcBuilder cab = new EllipticArcBuilder(fromPt, toPt, interiorPt)) { // do something with the builder EllipticArcSegment anotherCircularArc = cab.ToSegment(); } });
Target Platforms: Windows 10, Windows 8.1