TBX to PYT Translator
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 or Microsoft Visual C++ Compiler for Python 2.7 (to compile the C extensions yourself if you go the build route)
Instructions for Downloading (recommended method)
- Download the pre-built version from ArcGIS.com and continue with the steps below for usage.
Instructions for Building
- Download and unzip the .zip file or clone the repo.
- Build and install
C:\Python27\ArcGIS10.2\python setup.py install.
- Continue with the instructions for using the toolbox.
Instructions for Using (after downloading or building)
- Open the provided
converttbx.pytinside of ArcCatalog or Catalog View in ArcMap.
- Provide the existing .tbx file as input.
- Examine and refine the resulting
Find a bug or want to request a new feature? Please let us know by submitting an issue.
! WARNING !
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
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)