DPF in Mechanical doesn't run on Linux machine in 2022R1?

Member, Moderator, Employee Posts: 479
100 Answers 250 Likes 100 Comments Second Anniversary
✭✭✭✭
edited June 2023 in Structures

DPF code doesn't run on Linux machine in 2022R1?

enter image description here

Tagged:

Answers

  • Member, Moderator, Employee Posts: 479
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    Answer ✓

    For 2022R1 Ansys’ Linux installation is not shipped with the CS_DataProcessing.dll which the C:\Program Files\ANSYS Inc\v221\aisol\DesignSpace\DSPages\Python mech_dpf.py script adds a reference to, that is the error shown above.

    As a workaround you can copy C:\Program Files\ANSYS Inc\v221\aisol\bin\winx64\ CS_DataProcessing.dll from Windows Ansys installation on the Linux machine and add the reference to the dll in the new path, using the code below. Please make sure to add these lines at the top of your existing code:

    1. import clr
    2. clr.AddReferenceToFileAndPath("/Path/to/CS_DataProcessing.dll")
    3.  
    4. import mech_dpf
    5. mech_dpf.setExtAPI(ExtAPI)
    6. import Ans.DataProcessing as dpf
    7.  
    8. ds = mech_dpf.GetDataSources(1)
    9. ...

    NOTE: Currently for Linux, DPF’s IronPython API is not supported in Mechanical. If you have written some of your code using the IronPython API you will need to convert that to C++ Syntax (but still Python code). Please refer to mech_dpf.help()

Welcome!

It looks like you're new here. Sign in or register to get started.