Is This Content Helpful?
We're glad to know this article was helpful.
The following script creates a copy of the current .apr file and places it in the $HOME directory. When you save the project, this script will create a file with the same project name and a .bak extension instead of .apr. You can then manually change the .bak file extension to .apr and load it as an ArcView Project.
theProject = av.GetProject
theProjName = theProject.GetFileName
theprojStrng = theProjName.AsString
theCount = theProjstrng.count
thefnlCount = (theCount - 4)
theNewName = theProjStrng.left(thefnlCount)
theNewBak = theNewName ++ ".Bak"
theNewBakFile = theNewBak.AsFileName
'-- Makes a Bak file of current APR
theFName = TextFile.Make( theNewBakFile, #FILE_PERM_WRITE )
theAPR = TextFile.Make( theProjName, #FILE_PERM_READ )
source = theAPR.Read( theAPR.GetSize )
theFName.Write( source, theAPR.GetSize )
When you save this project, it will automatically save a file with the .bak extension to the default working directory.