How to select correct Femap instance using API
How to select correct Femap instance using API
(OP)
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
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





RE: How to select correct Femap instance using API
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
RE: How to select correct Femap instance using API
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
RE: How to select correct Femap instance using API
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
RE: How to select correct Femap instance using API
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