This Python toolbox (converttbx.pyt) will take any geoprocessing toolbox file (.TBX) and create a corresponding stub .PYT with a corresponding Python implementation of the tools with the original parameters of original toolbox.
- Create Skeleton PYT from a TBX
- Basic conversion from geoprocessing toolbox (.tbx) to Python toolbox (.pyt).
- ArcGIS 10.1
- Some experience editing Python code
- Microsoft Visual Studio 2008 (to compile the C extensions yourself if you go the build route)
- Download the pre-built version from ArcGIS.com and continue with the steps below for usage.
- Download and unzip the .zip file or clone the repo.
- Build and install
pytexportutils
:C:\Python27\ArcGIS10.2\python setup.py install
. - Continue with the instructions for using the toolbox.
- Open the provided converttbx.pyt inside of ArcCatalog or Catalog View.
- Provide the existing .tbx file as input.
- Examine and refine the resulting .pyt file.
New to Github? Get started here.
Find a bug or want to request a new feature? Please let us know by submitting an issue.
THIS IS NOT A 100% AUTOMATED SOLUTION TO CREATING PYTS. You will need to go in and look over the source before you use it. There will be areas where you NEED to change the source of the new PYT, and others where you'll need to do some sanity checking to make sure the PYT's functionality is similar to your original TBX.
Anyone and everyone is welcome to contribute.
Copyright 2012 Esri
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A copy of the license is available in the repository's license.txt file.
[](Esri Tags: ArcGIS Toolboxes) [](Esri Language: Python)