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

Options
wanghao
wanghao Member Posts: 27
First Comment 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: 237
    First Answer First Comment 5 Likes First Anniversary
    Options

    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
    First Comment Name Dropper
    Options

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