DPF integration in Mechanical
DPF is automatically available in Ansys Mechanical 2022 R2 and later. No separate installation is required. DPF is exposed through IronPython using the underlying C# DLLs.Accessing DPF
1. Through the Mechanical scripting window
The Mechanical scripting window provides direct access to DPF:- Open Ansys Mechanical
- Go to View → Scripting
- The scripting window uses IronPython with DPF already loaded
2. Through Python Result objects
When using Python Result objects in Mechanical:3. Through custom extensions
For custom Mechanical extensions:DPF assembly locations
DPF assemblies are located in your Ansys installation:- Windows:
C:\Program Files\ANSYS Inc\v261\aisol\bin\winx64 - Linux:
/usr/ansys_inc/v261/aisol/bin/linx64
CS_DataProcessing.dll- Main DPF namespaceAns_Dpf_*.dll- Various DPF components
Verifying DPF access
Test DPF access in the Mechanical scripting window:Troubleshooting
Cannot import DPF module
- Verify you’re using Ansys Mechanical 2022 R2 or later
- Ensure you’re in the Mechanical scripting environment
- Check that Mechanical is properly installed
Script execution errors
- Verify Python syntax is compatible with IronPython
- Check that you’re using the Mechanical API correctly
- Ensure result files are accessible
Access to result files
- Make sure the analysis has been solved
- Verify the result file path is correct
- Check file permissions