Not able to run optistruct using tcl commands

Manjunath0711
Manjunath0711 Altair Community Member
edited October 2020 in Community Q&A

Hi,

 

I am trying to run topology optimization using a script but its not working. I am using the below line to run optistruct.

 

*feoutputwithdata 'C:/Program Files/Altair/2019-edu/templates/feoutput/optistruct/optistruct' 'C:/Users/Manjunath/Desktop/TO-ML/mod/HM11.fem' 1 0 2 1 1
 

When I run this, hyperworks shows its finished but I am not able to find any output file. I feel that the TO is not running because of some mistake in the command.  I took this command from command.tcl file  which was created when I ran the TO manually. Can someone let me know how to fix this?

 

TIA 

 

Answers

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited September 2020

    Hi,

     

    this command only exports/writes the .fem file. Is it working correctly? your fem file is being written?

     

    for executing though the command line you need to call optistruct.bat and pass your model as an argument.

    you could use the TCL 'exec' command for it. Take a look at OptiStruct Running options in OptiStruct Help for further details. As you're using Student version i'm not 100% sure if batch mode is allowed. I think yes, but i don't know for sure.

    I would first try to submit using the windows command prompt, and make sure you have it all working, and then include it into your TCL code.

     

    As an example:

     exec notepad /p myfile.txt
  • Manjunath0711
    Manjunath0711 Altair Community Member
    edited September 2020

    Thank you very much, Its working