How to export Fluent msh file in linux by script in mechanical?

wanghao
wanghao Member Posts: 27
10 Comments Name Dropper
**

Hi.
I'm trying to export fluent msh file by pyMechanical and ACT scripts.
Is there any way or api can export it in linux?
https://discuss.ansys.com/discussion/comment/3445#Comment_3445?utm_source=community-search&utm_medium=organic-search&utm_term=export+mesh+msh

I have noticed the link but it seems worked only in Windows

Comments

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 291
    25 Answers 100 Comments 25 Likes First Anniversary
    ✭✭✭✭

    I do not have access to Linux. But based on method 2 of the referenced post, does this work on Linux?:

    FilePath = r"D:\FluentMeshFromWB.msh"
    JScmds = '''var DS = WB.AppletList.Applet('DSApplet').App;
    DS.Script.doFileExport("{}");'''.format(FilePath)
    ExtAPI.Application.ScriptByName("jscript").ExecuteCommand(JScmds)
    
  • wanghao
    wanghao Member Posts: 27
    10 Comments Name Dropper
    **

    It works!! @Landon Mitchell Kanner
    Thanks a lot!!!