![]() The call to ‘tp.session.close()’ is incorrect, that API doesn’t exist. The call to ‘dataset.zone(0)’ is unnecessary, but that and the print statements could provide useful information if you’re interested. The call to ‘tp.nnect()’ is optional – it’s used to connect to a running GUI instance of Tecplot 360, in which case these commands will drive the user interface. Notice that PyTecplot takes the ‘system/controlDict’ file as input, not the ‘case directory’ as ChatGPT indicates. Loading OpenFOAM data could be distilled down to two lines of code: import tecplot as tp Prompt: “Write a PyTecplot script to load OpenFOAM data” PyTecplot requires a Tecplot 360 license with our TecPLUS maintenance plan. MacOS Apple Silicon: /Applications/Tecplot 360 EX /bin/tec360-env ‐‐ python3-intel64 myscript.py ![]() MacOS Intel: /Applications/Tecplot 360 EX /bin/tec360-env ‐‐ python myscript.py Linux: /path/to/tecplot/bin/tec360-env ‐‐ python myscript.py Apple Silicon macOS machines (M1/M2 chip) will need to use the Intel version of Python, which should be installed by default. ![]() On Linux or macOS, make sure to start Python using the ‘tec360-env’ script to ensure Python can find the Tecplot 360 libraries. Print(“360 version:”, tp.sdk_version_info) Print(“PyTecplot version:”, tp.version_info) A good test script to run is: import tecplot as tp PyTecplot relies on an install of Tecplot 360 and the invocation of a PyTecplot command will trigger the loading of the 360 libraries on which PyTecplot depends. Just importing the module will indicate a successful installation, but you need to actually invoke a PyTecplot command to ensure you can run a script. PyTecplot might work with Python 3.6, but we no longer test against it. PyTecplot has a hard requirement of Python 3.7 or later (if you’re running ‘connected’ to the 360 GUI). ![]() PyTecplot is officially supported on the latest version of Python and the two previous. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |