cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Command to start new Creo Parametric session in asynchronous jlink application

AK_9776674
9-Granite

Command to start new Creo Parametric session in asynchronous jlink application

Hi All,

 

I am exploring jlink asynchronous method and I see in the jlink user guide that the syntax to start a noninteractive, nongraphical creo parametric session is as follows - 

pfcAsyncConnection.pfcAsyncConnection.AsyncConnection_Start
("pro -g:no_graphics -i:rpc_input",<text_dir>);
where pro is the command to start Creo Parametric.
I am not sure what I should put as 'pro' command. I have tried giving the path to parametric.exe in the Creo installation directory in C drive  as value of 'pro'. It worked if I give the relative path, but doesn't work for absolute path since mine has spaces in it and it doesn't get processed properly.

Is there a way to establish a session without providing the path to parametric.exe? If it is mandatory, then is there way to process the absolute path which has spaces? Since I am planning to develop a rest service from where I will call the API to start a session, I can't use the relative path and if possible would like to completely avoid the dependency on path altogether.

 

Thanks,

Apoorva

ACCEPTED SOLUTION

Accepted Solutions
remy
21-Topaz I
(To:AK_9776674)

You followed the documentation and figured that the spaces in the "pro" string are causing hiccups. This is a general Windows OS management issue and it can be resolved by different ways.
One of which is to put quotes, one before C and one after parametric.exe.

Another solution I personnally use is Symbolic Links. The tip consists in creating a "twin" path of your pro path without spaces in it. 

In order to create SL use the command mklink: https://kb.iu.edu/d/abbe 

View solution in original post

6 REPLIES 6

Hi,

please ask PTC Support.


Martin Hanák
remy
21-Topaz I
(To:AK_9776674)

You followed the documentation and figured that the spaces in the "pro" string are causing hiccups. This is a general Windows OS management issue and it can be resolved by different ways.
One of which is to put quotes, one before C and one after parametric.exe.

Another solution I personnally use is Symbolic Links. The tip consists in creating a "twin" path of your pro path without spaces in it. 

In order to create SL use the command mklink: https://kb.iu.edu/d/abbe 

sjuraj
15-Moonstone
(To:AK_9776674)

just use quotes to wrap aboslute path, eg:

"c:\program files\ptc\parametric.exe" -g:no_graphics -i:rpc_input

May I also ask to confirm that the executables passed in the AsyncConnection.connect() and AsyncConnection.start() methods are intentionally different?

 

That is, while pfcls.pfcAsyncConnection.connect() requires the path to the pro_comm_msg.exe application (to connect to a running Creo executable), to start a new or additional Creo executable asynchronous connection, pfcls.pfcAsyncConnection.start() requires that the path be to the parametric.exe application.

 

Lonnie.

remy
21-Topaz I
(To:LV_10286642)


@LV_10286642 wrote:

May I also ask to confirm that the executables passed in the AsyncConnection.connect() and AsyncConnection.start() methods are intentionally different?

 


Your understanding is correct. Why would you think otherwise?

LV_10286642
2-Explorer
(To:remy)

Only because documentation for the API with consistent examples of the use
of each method is not easily found. Yes, there are fragments here and there
and there are some documents with the API so I am not saying that no such
documents exist.

Simply that it is not clear which executables each method expects to
receive a path for.

Thank you for one confirmation.

I can also share in the confirmations from having called these that the
first seems to need the pro_comm_msg executable and the second seems to
need the parametric.exe.

Because there remain occasional XToolkit outages (with very little
explanation) when using these methods and executables, I am not yet certain
we have honored the interface expectations for the API.
Announcements


Top Tags