' grid2ptshp.ave ' Written by Timothy S. Thomas ' Began programming 11/1/00 ' Last modified 11/1/00 ' This program makes a centroid 4 grids. theProject = av.GetProject theView = av.GetActiveDoc theThemeList = theView.GetActiveThemes theTheme = theThemeList.Get(0) theGrid = theTheme.GetGrid theShapeFN = FileDialog.Put( ("c:\temp\temp.shp").AsFileName, "*.shp","New polygon shapefile filename") theProjection = Prj.MakeNull newFTab = theGrid.AsPointFTab(theShapeFN, theProjection) newFTab.Flush ' Create the new Theme NewThemeName = SrcName.Make(theShapeFN.AsString) NewTheme = Theme.Make(NewThemeName) ' Set the Theme name without the extension .shp NewTheme.SetName(theShapeFN.GetBaseName.AsTokens(".").Get(0)) ' Add it to the active View theView.AddTheme(NewTheme) ' Make sure the View is on top theView.GetWin.Activate ' Flag that the Project has been modified av.GetProject.SetModified(True)