lately I'm dealing with large simulation files in NX Flow which run for 12 hours upwards. Since I'm not able to access remotely to my workdesk, I was wondering if there is a way to receive an email to know if a simulation has abborted due to errors or has finished correctly.
Thanks a lot in advance
because you did not get an answer from nx developer or siemens partners I think there is no way in nx itself for transerfing solving state informations by using E-Mail-activities.
But if you would use the command line abilities of nx for solving you also can combine it with command line e-mail programs like blat (see http://www.blat.net)
If you run your NX solution process as Batch-Script you can add a command for sending an E-Mail as last action:
REM NX-COMMAND LINE section ================================================
call ... +++ I do not know the corret command line for NX flow +++
REM E-MAIL-COMMAND LINE Section =============================================
set MAIL_PROGRAM=+++ C:\Program files\blat300\full\blat.exe or something like that +++
set MAIL_SERVER_STRING=+++ EMAIL SERVER like mail.arcor-ip.de +++
set MAIL_FROM_STRING=+++ EMAIL adress of sender +++
set MAIL_TO_STRING=+++ EMAIL adress of recipient +++
set MAIL_SUBJECT_STRING=+++ SUITABLE HEADLINE FOR EMAIL like "NXSolution process..." +++
ECHO " " > mail_body.txt
ECHO "INSERT a suitable desription in body file" >> mail_body.txt
ECHO "Additional line" >> mail_body.txt
ECHO _________________________________________> !MAIL_SIG_FILE!
ECHO automatially reated by ... >> !MAIL_SIG_FILE!
call !MAIL_PROGRAM! -to "!MAIL_TO_STRING!" -subject "!MAIL_SUBJECT_STRING!" -bodyF !MAIL_BODY_FILE! -server !MAIL_SERVER_STRING! -f !MAIL_FROM_STRING! -sig !MAIL_SIGNATURE_FILE!
IF EXIST !MAIL_SIG_FILE! del !MAIL_SIG_FILE!
IF EXIST !MAIL_BODY_FILE! del !MAIL_BODY_FILE!
REM END section ==================================================
Try to enhance NX with your own E-MAIL notification! With a littly practice and knowledge in batch scripting you also can improve your message with informations out of nx log-files or protocol files. Additional date and time information or something like that are also good extensions.
Good luck, Michael
Edit: It only works with Windows.
thank you very much for your help. I suspected there would not be a simple way to set it up but wanted to get sure first before getting into programming batch-files or vba scripts.
Nevertheless, thanks again!
PS: I've just written a Powershell Script file which works without problems.
# START MONITORING MODE for opened NX SOLUTION MONITOR
$SolverActive = Get-Process xcsmon_viewer -ErrorAction SilentlyContinue
# FILL-IN EMAIL
$SMTPServer = " " # SMTP Server adress
$SMTPPort = " " # SMTP Sending Port
$Username = " " # Your Email account with @...
$Password = " " # Your Email Password
$to = " " # Receivers Email adress
$subject = " " # Email Subject
$body = " " # Email Text
$attachment = "C:\test.txt" # If desired to add an attached file
# SEND EMAIL
Send-MailMessage -SmtpServer $SMTPServer -From $Username -To $to -Subject $subject -Body $body
write-host "Mail Sent" # Output message. Email has been sent
Remove-Variable SolverActive # Delete variable from memory