Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Running Analysis in NEiNastran using API script automatically

Status
Not open for further replies.

Tekiti

Aerospace
Jan 8, 2013
4
0
0
CZ
Hello,

I wrote a script in Femap using API. In this script there is running a static linear analysis for many times (for example for 200 times) because using this script i want to solve some stress redistribution. I am using NEI Nastran Editor as a solver. I have a problem, that when the script runs an analysis Femap wants me to write a model to Nastran - there is a window, where I name it, click save and then NEi Editor starts an analysis. My question - is there any possibility how to for example write a model before running script ? For example using NX Nastran solver it is possible to run it fully automatically using this:

Sub Main()
Dim femap As Object
Set femap = GetObject(, "femap.model")

Dim am As Object
Set am = femap.feAnalysisMgr

Dim amID As Long

am.Title = "Static Analysis"
am.Solver = 36
am.AnalysisType = 1
am.BCSet(0) = 1
am.BCSet(2) = 1
am.output(8) = -1
am.output(15) = -1
am.output(16) = -1
am.CornerOutput = -1
amID = 3
am.Put (amID)
am.Analyze (amID)

End Sub

I need to run script fully automatically because it is impossible and user unfriendly to save it before every of 200 analysis manually . I hope, that my description is clear enough.
 
Replies continue below

Recommended for you

If you create and environment variable NENAST_EXE=.... pointing to the NE Nastran executable, am.Analyze should then launch and run NE Nastran for you.

Mark.
 
Status
Not open for further replies.
Back
Top