0

I am having trouble determining how to best deliver my script tool for use in ArcMap 10.7. I can create a toolbar that has my custom script tool in it. That is easy. The trouble is I can't get the script tool to stay in the toolbar.

enter image description here

I have done all the correct settings but I can only get built in tools to stay in my custom toolbar. I can get the custom script to stay in the custom toolbar but only when I save it to the current MXD.

Does that mean anyone who opens that MXD can see it or just me?

I reviewed how to do a addin button but it appears I can only add scripts to the buttons as opposed to full on script tools. I have criteria that the user needs to fill out.

  • Uncheck Create new toolbars...the document, that will allow your changes to modify your Normal.mxt otherwise changes are only made to the current MXD which will be visible to everyone who opens that document provided that the path to the tool actually contains your tool. What language is your toolbar in? (ArcObjects or Python)? – Michael Stimson Jul 4 at 23:44
  • I have unchecked the box but still get the same response. The custom script which I wrote in python refuses to stay in the toolbar. The toolbar itself and any built in tools appear without issue. – Damned_Novice Jul 4 at 23:55
  • 2
    In ArcObjects there is an autoLoad="true" attribute in the esriconfigx XML file which you may need to activate to fully load your tools on startup. I've done toolbars, buttons and tools in ArcObjects but not in python so can't really offer too much help on your question. – Michael Stimson Jul 5 at 0:42
  • Thanks this feels like I am going to have to do a lot of research before I get my answer. off to google. – Damned_Novice Jul 5 at 0:58
  • 1
    Addressing your last paragraph... You can add a script tool to an add-in button (or other add-in action). You just need to have the button script call the command: pythonaddins.GPToolDialog(toolbox_name, tool_name) – Son of a Beach Jul 5 at 1:04

Your Answer

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

Browse other questions tagged or ask your own question.