Hi,
I have a problem typecasting Verteces in Delphi. In C# it is really simple:
But in Delph the vertex as Location gives me a compiler error.Code:object[] vertices = shape.Vertices as object[]; foreach (object vertex in vertices) loc = vertex as Location;
Last line give me compiler error. Any idea's ?Code:var Zone: Shape; Vertices: array of OLEVariant; Vertex: OLEVariant; n, Len: integer; Loc: Location; begin Zone := MP.Map.Shapes.AddDrivetimeZone(LocSonal, 15 / 1440); Vertices := Zone.Vertices; for n := Low(Vertices) to High(Vertices) do begin Vertex := Vertices[n]; Loc := Vertex as Location;