Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write PRNSOL output to a file

Status
Not open for further replies.

madal

Automotive
Sep 16, 2004
9
I'd like to write a macro file that performs some PRNSOL commands on different components and, instead of having the results in the usual popup window, I'd like to have them directly in a txt file to use in other applications.
My ideal macro should than be:
...
...
cmsel,s,comp1
PRNSOL,U,SUM
<command to write to file1>
cmsel,s,comp2
PRNSOL,U,SUM
<command to write to file2>
...
...
Can anyone help me?!?!?

Many many thanks in advance
Al
 
Replies continue below

Recommended for you

No problem:

...
...
cmsel,s,comp1
/output,comp1_output,txt ! redirect output to a file called "comp1_output.txt"
PRNSOL,U,SUM
/out
cmsel,s,comp2
alls
/output,comp2_output,txt
PRNSOL,U,SUM
/out
...
...

The above will only work if you read the file in using the

/input

command or from

File > Read input from

So make sure you save the above in a separate text file and read it in.

Cheers,

-- drej --
 
Thank you very much, Drej.

After I wrote my question, I tried with "/out,file_name" too, but I missed to execute the macro: I only copied-pasted the lines into command line, and obviously in that case it doesn't work...

Too much work, not enough coffe!

Al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor