HOW TO

Replace a system script with a custom script

Last Published: April 25, 2020

Procedure

Summary

The system script can not be deleted. There are, however, three ways to override a system script with one of your own.

Procedure

A. Current project

1. Open a new script window and load the system script that you want to modify.

2. In Script/Properties, type the name of the system script you want to change.

3. Now modify it, compile it.

Your script will override the system script of the same name, but only for your current project.

B. Single user

1. Do everything in 'A' above.

2. Open the Customize dialog and click the Make Default button. This writes a user default.apr file into your $HOME directory.

Your script will override the system script for all projects while you are logged in, other users will not be able to do the same.

C. All users

1. Do everything in 'A' above.

2. Open a new script editor window and type in the following line:

Code:
av.getproject.MakeSysDefault("C:\default.apr".AsFileName,FALSE)

3. Compile it and run it. ArcView will write a new system default.apr right on the root of your C: drive.

3. Navigate to ArcView's etc directory and find the file called default.apr. Rename it to default.old.

4. Navigate to the root of the C: drive and copy this new default.apr file into ArcView's etc directory.

Your script will override the system script for all projects and for all users
who use this installation of ArcView.

Note:
You can delete an embedded script by using the request RemoveScript. You can delete a project's script by using the request RemoveDoc to delete the Script Editor (SEd) doc that the script belongs to.


Article ID:000001511

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic