Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

How to select correct Femap instance using API

Status
Not open for further replies.

TadeuszSz

Marine/Ocean
Feb 26, 2015
5
Hello,
is it possible to choose Femap instance (process) from many already running?
I'd like to get list of opened Femap instances and put them to e.g combobox.

Tadeusz
 
Replies continue below

Recommended for you

Hi,
Do you mean different models?

Here's what the API can do: for one FEMAP instance with multiple models/windows in it, you can retrieve all opened models. Check out Help > 3.16.1.6 feAppGetAllModels.
Then you can retrieve the models' names, put them in a droplist box so the user can select one, and go to it using feAppSetModel for example.

What FEMAP can't do (well not that I know of) is switch between opened instances of FEMAP. If you open FEMAP twice for ex, I dont think you can switch between them.

AP
 
Thanks for your reply.
Unfortunetely, the second option is what I need (switch between opened instances of FEMAP).
I work with VB.NET and I thought it is still possible with some system functions. Maybe running object table (ROT)? But I have no knowledge on this topic.

Tadeusz
 
Hello Tadeusz,


Femap uses COM-object technology for API programming. And it has limitation - it is possible to connect only to one instance (which was started first).
What is possible to do - check if more than one instance of Femap is running and give a warning.
We get list of running processes and check if name contains "Femap". If you need some example let me know I will find one.

Yarko
 
Thanks Yarko for your reply.
I can check the number of running Femap instances so example is no needed.
It looks I have to redesign my app due to this limitation to be sure my code runs in correct Femap instance.

Tadeusz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor