Skip to main content
This guide covers how to access and use DPF within Ansys Mechanical.

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:
  1. Open Ansys Mechanical
  2. Go to View → Scripting
  3. 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
Key assemblies (already loaded in Mechanical):
  • CS_DataProcessing.dll - Main DPF namespace
  • Ans_Dpf_*.dll - Various DPF components
Note: In Mechanical’s scripting environment, these are automatically loaded. You don’t need to manually add references.

Verifying DPF access

Test DPF access in the Mechanical scripting window:
If successful, you should see the module and object information printed.

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

Next steps

Continue to Hello DPF to run your first script.