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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How to trigger Creo APIs/functionalities from external cloud application

AK_9776674
8-Gravel

How to trigger Creo APIs/functionalities from external cloud application

Hi All,

 

I have a requirement where I am developing a application which will be deployed to cloud PaaS or SaaS. 

I need this application to interact with the Creo Parametric and perform actions such as - retrieving and loading a design in a new Creo Session. My first though was to use JLink asynchronous method and deploy the code as Rest API. But this is giving issues related to loading libraries, which I can't seem to resolve.

 

Please help with this requirement. It doesn't matter if this is done synchronously or asynchronously, I just need to establish some sort of connectivity from cloud to on-prem Creo.

 

Thanks,

Apoorva

3 REPLIES 3

Hi, try to explore similar cases

Search by key word "REST" 

sjuraj
13-Aquamarine
(To:AK_9776674)

I think your only way is to use assynchronous jlink application because any application "listening" any triggers will block jlink thread.

As said in creo jlink guide:

When you run a synchronous Creo Object TOOLKIT Java program, you should
configure your program so it does not interfere with the main thread of the Creo
program. Because the Java API allows you to run with multiple threads, you
should be cautious of using certain Java routines in your program.
The most obvious restriction involves the use of Java language user interfaces.
Any Java window that you create must be a dialog box that is blocking (or modal).
Creating a nonblocking frame causes a new thread to begin, which can have
unexpected results when running with Creo application. For example, you can use
the javax.swing.JDialog class and set modal true. You cannot use
javax.swing.JWindow, however, because it starts a thread.

To communicate with your cloud app I would use websockets: here is nice tutorial 

This cannot be used in synchronnous app because websocket create TCP socket listening on specific port which will block creo until socket is not closed.

You can also periodically connect and disconnect to your cloud app but you will no longer be able to trigger from cloud.

pretty simple using :

 

CREOSON

 

Top Tags