PyTecplot 1.1 Released (December 11th) This release added support for Python 3.8 on Windows, new collection classes for operating on FieldMaps and LineMaps, and more. See the changelog on Pypi.org.
Take advantage of the power of the Python scripting language, and gain direct access to your data with PyTecplot. PyTecplot integrates fully with other Python-compatible tools, making Tecplot 360 part of your engineering ecosystem.
- Automate workflows that use multiple engineering tools, with a single scripting language.
- Perform detailed calculations on all your CFD data sets.
- Access CFD data directly for custom analysis.
- Read any data type.
- Extract values, figures and animations directly from CFD data sets.
- Connect Tecplot 360 to other tools and processes.
*PyTecplot is available to customers with TecPLUS maintenance service.
Installation instructions, a quick start guide, examples of loading layouts, exception handling, slice extraction, Numpy integration, executing equations & line plots, and a complete reference section are included in the PyTecplot documentation.
PyTecplot is hosted on PyPI so you simply need to run ‘pip install pytecplot’ from a command prompt. Easy as Py!
PyTecplot is included in the Tecplot 360 installation so you can install from there if you have an overzealous firewall.
Handy Python Scripts
PyTecplot makes the slow things fast and the hard things possible.
We have developed a few scripts that will help you automate your workflows and perform advanced analysis.
Introduced in Tecplot 360 2017 R3, recording of PyTecplot scripts is available so that you can draft advanced scripts as easily as you record current Macros. We are incrementally adding commands which are recorded as pure Python. Commands that have not been added yet are recorded using tecplot.macro.execute_command.
As a part of increasing the functionality of our PyTecplot API, we are introducing the capability to control an interactive instance Tecplot 360 EX directly from Python. This ability coupled with the ability to record PyTecplot scripts allows you to utilize the power of Python in more of your workflows and perform complex analyses, faster.
Q: Can I run PyTecplot in parallel?
Yes! Multiprocessing libraries are now available! Watch our latest Webinar and find out how to take advantage of multi-processor parallelism to get results much faster. Watch the Webinar to find out how!
Q: Do I need a separate license?
No, PyTecplot is included with your Tecplot 360 purchase and will continue to run as long as you have an active TecPLUS subscription.
Q: Can I use my favorite Python development environment (IDE)?
Yes. We’ve tested PyTecplot with Wing, PyCharm, Eclipse, and others.
Q: How does PyTecplot work?
PyTecplot can run either in batch mode or connected to a running instance of Tecplot 360. Batch mode is ideal for automated image and video creation or complex data analysis and data extraction. Running connected to Tecplot 360 is ideal when you want to automate a portion of your workflow and continue work within Tecplot 360. In connected mode you can event control Tecplot 360 with simpie UIs build with Python GUI toolkits like PyQt!
Q: Are you getting rid of the Macro language?
No. PyTecplot can use macro commands, which allows macro experts to easily merge the advantages of Python (like arrays, logic, string processing) with their knowledge of the Tecplot macro language.
Q: How much of the API is currently available?
We will continue to develop the API until we reach nearly all of what is available via the macro language. For APIs that have not been developed yet you can use tecplot.macro.execute_command() to use Tecplot macro commands.
Q: Which platforms do you support?
Windows, Linux, and Mac. See the Tecplot 360 requirements.
Q: You had a Python API in Tecplot 360 2013, what’s different about this one?
We initially introduced a Python API in 2008. That Python API was a lightweight cover over our C API and did not feel like Python. That API also required Python to be installed along with Tecplot 360 which caused installation conflicts. Finally, scripts written using that API had to be run within Tecplot 360, making it very difficult to debug your script.
PyTecplot is a completely redesigned API that embraces several features of the Python language making it a more natural interface to use within a Python script. It is now a pure-python module that loads Tecplot 360’s libraries on import.
Q: How do I install PyTecplot?
First off, PyTecplot requires an installation of Tecplot 360 2017 R1 or later. PyTecplot is also hosted on pypi.python.org so you simply need to run ‘pip install pytecplot’ from a command prompt. Easy as Py!
PyTecplot is also included in the Tecplot 360 installation so you can install from there if you have an overzealous firewall or want to ensure the PyTecplot version you’re installing is guaranteed to be compatible with your version of Tecplot 360.
Q: Can I record a Python script?
Yes! PyTecplot recording and connections was introduced in Tecplot 360 2017 Release 3. Learn more and watch the video on the PyTecplot page.
Q: Can I use PyTecplot with Jupyter Notebooks (IPython)?
Yes! Don’t know what a Jupyter Notebook is? Check them out here: http://jupyter.org/.
Q: I’m using PyQt in Windows and import tecplot gives an error. How do I fix this?
Be sure that you import tecplot before importing PyQt.
Q: When should I use PyTecplot instead of the Macro language?
When you need to perform batch processing. In this case, PyTecplot gives you:
- Direct access to your data – Use PyTecplot to load any data file format supported by Tecplot 360 and access the data directly to perform post-processing otherwise not possible within Tecplot 360 or with macros.
- A real programming language – PyTecplot allows you to use all of the utilities afforded by Python such as arrays, string processing, and integration with other Python packages. You can also debug and develop using the same tools you’re already using for your existing Python scripts.
- Integration with other processes – Python allows to you more easily integrate Tecplot 360’s capabilities into existing workflows.
Q: Do you have example code?
We have some simple examples included in the PyTecplot documentation.
Q: What versions of Python do you support?
We support 2.7+ and 3.4+ and also require 64-bit Python.
Q: Exactly how does the API work? Do I create and manipulate objects like frames, datasets and plots?
Pytecplot is object based however the objects are, for the most part, references to objects that exist within the Tecplot plotting engine. For example, when data is loaded into a frame and you elect to make a Cartesian 2D plot you can gain access to various aspects of the style (e.g. slice attributes) that pre-exist in the plot. From that point on you can manipulate the style in the plot. You cannot create an object containing slice attributes outside of the plotting framework.