🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Starting a Solver automatically

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Hey guys,

 

is it somehow possible to start and execute an OptiStruct Solver Run automatically by a .tcl command or script?

The aim of this is to create the .h3d-File and .res-File automatically without pressing any buttons.

 

I'm working with the 2017.2 student version of HyperWorks.

 

Kind regards and thanks in advance,

Simon

Find more posts tagged with

Sort by:
1 - 8 of 81
    User: "tinh"
    Altair Community Member
    Updated by tinh

    I answered this in a certain topic. Please search it first

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hey tinh,

     

    I've checked the other topic, but an error is still occuring.

     

    This is the part of my code where I'm trying to run the simulation:

    *createstringarray 1 'CONNECTORS_SKIP '
    hm_answernext yes
    *feoutputwithdata 'C:/Program Files/Altair/2017.2-edu/templates/feoutput/optistruct/optistruct' 'C:/Users/Simon/Desktop/CAO/test.fem' 1 0 2 1 1
    exec 'C:/Program Files /Altair/2017.2-edu/hwsolvers/scripts/optistruct.bat' 'C:/Users/Simon/Desktop/CAO/test.fem' -analysis
    *writeh3dwithoptions 'C:/Users/Simon/Desktop/CAO/test.h3d' 1 4

     

    The test.fem is written and saved into the desired folder, but an error is occuring in the next line.

    Error_1.PNG.8183b7098c30754f0a2f9241f599185d.PNG

    Could you help me out there? I'm using Windows 10.

     

    Besides, I'm aiming for writing a .res-file. Do you know how this works?

     

    Kind regards and thanks in advance,

    Simon

     

    User: "tinh"
    Altair Community Member
    Updated by tinh

    I don't have education version.

    Try searching file optistruct.bat by window search box

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    I know where it is located and I'm pretty sure to have chosen the right path.

    Any other idea why it doesnt work?

    User: "tinh"
    Altair Community Member
    Updated by tinh

    I don't believe you

    Sure I believe computer, because the error says 'no such file or directory', obviously

     

    Try again and again

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    As you can see on the screenshot, this is the path indicated by windows.

    Path_OptiStruct.png.d20473a13dad7e99911fac1f61d9bcca.png

    I improved my code to:

    *createstringarray 1 'CONNECTORS_SKIP '
    hm_answernext yes
    *feoutputwithdata 'C:/Program Files/Altair/2017.2-edu/templates/feoutput/optistruct/optistruct' 'C:/Users/Simon/Desktop/CAO/test.fem' 1 0 2 1 1
    'C:/Program Files /Altair/2017.2-edu/hwsolvers/scripts/optistruct.bat' 'C:/Users/Simon/Desktop/CAO/test.fem' -analysis

     

    Now an error is occuring saying that the last line is an invalid command name.

     

     

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Certainly, it needs exec command

     

    The file optistruct.bat is existing

    That means the path you typed in is wrong

    Please check it.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hey tinh,

     

    it finally worked out. Thanks for your patience and help.

     

    Simon