Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello,
My main application is an asynchronous toolkit executable application processing multiple JOBS in batch mode.
Each JOB contains pair of an input model and associated action on it [e.g. creating a manufacturing output or FEA analysis or file conversion] )
I am running this in batch mode, but currently limited to executing it synchronously. i.e. Starting a creo session and passing each job to it for processing one by one.
I want to start multiple creo sessions and process more jobs at a time in parallel.
As a part of process steps would be,
1. Start a Creo session in async mode and connect to it
2. Run job through this session
3. Disconnect and then stop the creo after job processing is done.
4. Do steps 1 to 3 with more than 1 creo sessions present locally on same machine or on network
Currently I am using ProEngineerConnectionStart() to start a session and get its handle, but since ProEngineerEnd() is not taking any parameter to it, can't really end a session after job assigned to it is finished as mentioned in step 3.
Also in some cases when jobs are hanged/failed due to some unintended behavior, I really can't close the associated session.
Can someone help on this ?
Thanks in advance !
Swap
I don't think that simultaneous connection to multiple Pro/E session is possible. Have you tried to run multiple instances of the toolkit application?
Also, if you are trying to speed up the output, the first thing I'd look is to set everything to no graphic mode. From my experience working in no graphic mode is 5 to 10 times faster.
I need to mention that before starting a project like this I'd take a close look at Creo Distributed Batch capabilities. Maybe the tasks that I need to be done are already implemented there.
Hi Gabriel,
Thanks for your input.
I had thought that since PTC had provided ProEngineerStart()/ProEngineerConnectionStart() functions, we can create multiple creo executable and connect/disconnect with them.
But it seems , you are right. One async program can connect to one Creo executable at a time, again making it synchronous.
I will try with multiple Creo sessions as mentioned by you.
By the way, I am already running my processes in no graphic mode and reaping the benefits of speed due to that.
On Creo Distributed batch, I do not have much experience, but would explore it.
With my limited knowledge of it, I think it can run some pre-defined tasks only. ( e.g. Create PDF )
Does it provide functionality to run your custom creo toolkit program for each models as mentioned above ?
Thanks !
Swap
I think there should be a problem with the NMSD PORT. So you need to replace it with another port. But we have problems to connect an async Tool to Creos that are start up with a different one : )
Also there are the PTC Helpprogramms (like agent, ...) that only start up once. As far as I know they would be used for the connection so that could be difficult too.
I think it's not possible. But wish you all the best to solve the quest.
Br,
Eike
Hello Swapnil,
I know it is possible but in another way most people might think.
i've written a tool/poc to control multiple sessions but its neiteher synchronuos nor asynchronuos.
Here is a way to work around the situation:
Controller plain Java --> socket --> socket --> synchronus plugin in creo. (in my case on same box)
If a creo session with the "client" plugin is started it registers itself in the controller which passes then numbers for files to be processed to the "client" and also a command could be sent. (not needed in my case but this way the client can decide different actions...)
The controller runs through a list with filenames and action commands.
The client reports back debug and status information to the controller, which also does some logging (and of course displaing it)
Feel free to contact me directly at anytime for further details & think java !
Have a nice day
Leo
Hi Swap,
we are using a different architecture to maintain job processing on multiple Creo session paralelly.
We have written 'JobServer' that starts one Creo Session and communicates with this one Creo session.
We start several jobservers on severals computers and send them messages through window's message queue. You can use sockets as well.
Can this be solution to your issue?
Regards,
Tom