×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Running Analysis in NEiNastran using API script automatically

Running Analysis in NEiNastran using API script automatically

Running Analysis in NEiNastran using API script automatically

(OP)
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.

RE: Running Analysis in NEiNastran using API script automatically

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources