How to erase vertices from a Polygon annotation?


How to erase a vertex of a Polygon annot. There is only GetVertex and SetVertex?


The vertices are stored under an entry called Vertices, which is an array of numbers, where each vertex is a pair of numbers in order of x,y.

So to erase the nth vertex simply call the following.

Obj vertices = polygon.GetSDFObj().FindObj("Vertices"); if(vertices != null && vertices.IsArray()) { vertices.EraseAt(n*2); // erase x value vertices.EraseAt(n*2); // erase y value }

This also applies for Polyline annotations.