aView = av.GetActiveDoc osTemas = aView.GetActiveThemes for each oTema in osTemas aVtab = oTema.GetFtab aVtab.StartEditingWithRecovery aSel = aVtab.GetSelection aSel.SetAll oC_Shape = aVtab.FindField("Shape") For each oRec in aSel oShape = aVtab.ReturnValue((aVtab.FindField("Shape")),oRec) oTipo = oShape.GetDimension if (oTipo = 0) then ox = oShape.GetX oy = oShape.GetY ox1 = ox ox = oy - 9000000 oy = 9400000 - ox1 aVtab.SetValue((aVtab.FindField("Shape")),oRec,Point.Make(ox,oy)) elseif (oTipo = 1) then aLista_Lines = oShape.asList aNova_Lista_Lines = {} for each aList_Points in aLista_Lines aNova_Lista_Pontos = {} for each oPoint in aList_Points ox = oPoint.GetX oy = oPoint.GetY ox1 = ox ox = oy - 9000000 oy = 9400000 - ox1 aNova_Lista_Pontos.Add(Point.Make(ox,oy)) end aNova_Lista_Lines.Add(aNova_Lista_Pontos) end aVtab.SetValue((aVtab.FindField("Shape")),oRec,PolyLine.Make(aNova_Lista_Lines)) elseif (oTipo = 2) then aPolyline = oShape.asPolyline aLista_Lines = aPolyline.asList aNova_Lista_Lines = {} for each aList_Points in aLista_Lines aNova_Lista_Pontos = {} for each oPoint in aList_Points ox = oPoint.GetX oy = oPoint.GetY ox1 = ox ox = oy - 9000000 oy = 9400000 - ox1 aNova_Lista_Pontos.Add(Point.Make(ox,oy)) end aNova_Lista_Lines.Add(aNova_Lista_Pontos) end oNovo_Poly = Polygon.Make(aNova_Lista_Lines) aVtab.SetValue((aVtab.FindField("Shape")),oRec,oNovo_Poly) end end aVtab.StopEditingWithRecovery (TRUE) end