How do you pass arguments to a Workbench journal from the command lines?

Pierre Thieffry
Pierre Thieffry Member, Moderator, Employee Posts: 95
First Anniversary Ansys Employee Solution Developer Community of Practice Member Photogenic
edited June 2023 in Structures

I am running Workbench using runwb2.exe -R myjournal.wbjn. How can I pass arguments to the journal?

Answers

  • Pierre Thieffry
    Pierre Thieffry Member, Moderator, Employee Posts: 95
    First Anniversary Ansys Employee Solution Developer Community of Practice Member Photogenic

    The "-E" option will help. Let's take a simple journal example. If myjournal.wbjn contains:

    c=a+b
    

    I will pass values for a and b using this:

    runwb2.exe -E "a=1" -E "b=2" -R myjournal.wbjn 
    

    The "-E" option lets you pass a statement to Workbench that can be used in your journal.

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 183
    First Answer First Comment 5 Likes First Anniversary
    edited July 2023

    Other options for runwb2.exe can be found here