4

I've written a python toolbox for my company containing several scripts to speed up various repetitive tasks. Each time we want to use it we have to open ArcToolbox, right click and select "Add Toolbox...", then find the toolbox. If the mxd had previously been saved with the toolbox open, it remains open as part of the mxd.

I've tried the right click > "Save Settings" > "To Default" option with no luck - toolbox is missing next time I open ArcMap.

Is there a way to open the python toolbox by default every time ArcMap is opened, regardless of which mxd is opened or who's logged on etc?

7

This help topic should get you started -- basically you embed your toolbox in a Python package and install it in your local Python installation. Then your tool should show up automatically under system toolboxes.

1

You should add the toolbox to the Normal.mxt - and copy this customized Normal.mxt to each user's install files location.

See the last section of the Fundamentals of saving your customizations help page for more details.

So if I understand correctly (never tried myself):

When opening ArcMap, ArcGIS uses the Normal.mxt from the user profile (usually stored in C:\Users\user_name\AppData\Roaming\ESRI\Desktop10.2\ArcMap\Templates). You might need to check the option to show hidden folders to see the AppData directory.

If there is no Normal.mxt in the user profile, ArcGIS checks the install file (usually C:\Program Files (x86)\ArcGIS\Desktop10.2\Templates), as explained in the article. If there is an mxd in here, it will use it as template (the extension doesn't matter since it's indeed not possible to save an mxt since version 10.0.) What matters is the location of the map document.

And if there's is no map document in the install file, ArcGIS will regenerate a Normal.mxt in the user profile.

So what you should do is 1. Save your "template" mxD in the install file 2. Delete the Normal.mxt from the user profile.

Could you please try this and report the result?

  • Thanks GISGe. I should add that this is in ArcMap 10.2.2 - is there a way to edit and save .mxt files? – davehughes87 Jan 19 '15 at 13:17
  • See edited answer – GISGe Jan 19 '15 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.