Skip to main content
11-Garnet
Jan 12, 2022 7:55 AM UTC
Question

Connection between Pro/Toolkit and Object Toolkit C++

Hello,

I've created Pro/Toolkit customization and I would like to connect to the Creo Parametric instance that is created in another customization, that based on Object Toolkit C++ .

Is such connection possible between different Toolkits possible(Pro/Toolkit and Object Toolkit C++)?

5 replies

24-Ruby IV
Jan 13, 2022 8:41 AM UTC

 Hi,

 

The following article may be helpful for you - "Difference between Creo Parametric TOOLKIT and Creo Parametric Object TOOLKIT C++": https://www.ptc.com/en/support/article/CS154980 

Translate
Lukasz111-GarnetAuthor
11-Garnet
Jan 18, 2022 9:00 AM UTC

Hi,

The Creo Parametric instance was initiated by  Object Toolkit C++ and I tried to connect to the instance.

1. By using Object Toolkit C++ I am able to connect

    pfcAsyncConnection_ptr conn = pfcAsyncConnection::Connect("", "", "", 5000);

    pfcSession_ptr sess = conn->GetSession();

    xstring cid = sess->GetConnectionId();

2. By using Pro/Toolkit I am unable to connect to the same instance

    ProEngineerConnect("","", "", NULL, PRO_B_TRUE,5000, &choice, &handle);

    ProEngineerConnectIdGet(&connID);

 

Am I doing something wrong in Pro/Toolkit?

 

Translate
17-Peridot
Jan 20, 2022 10:49 AM UTC

Take a look at the documentation chapter "Task Based Application Libraries".

You can interop between a different aux applications in one session (instance) Creo.

 

Do you want to "talk" between two separate instances Creo Parametric application?

Translate
Lukasz111-GarnetAuthor
11-Garnet
Jan 28, 2022 8:04 AM UTC

Correct, or be able to connect to the Creo instance created by another toolkit. 

Currently instance created in Object toolkit C++ is not accessible in Pro/Toolkit.

Translate
17-Peridot
Jan 28, 2022 8:21 AM UTC

Try this:

ProEngineerConnect(NULL, NULL, NULL, NULL, PRO_B_TRUE,5000, &choice, &handle);

 

PS: what an error you get from ProEngineerConnect?

Translate