Skip to main content
1-Visitor
March 11, 2022
Solved

Command to start new Creo Parametric session in asynchronous jlink application

  • March 11, 2022
  • 4 replies
  • 4110 views

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

Best answer by remy

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 

4 replies

24-Ruby III
March 11, 2022

Hi,

please ask PTC Support.

remy21-Topaz IAnswer
21-Topaz I
March 11, 2022

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 

15-Moonstone
March 11, 2022

just use quotes to wrap aboslute path, eg:

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

1-Visitor
April 27, 2022

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.

21-Topaz I
April 28, 2022

@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?

1-Visitor
April 28, 2022
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.