Skip to main content
11-Garnet
January 12, 2022
Question

Connection between Pro/Toolkit and Object Toolkit C++

  • January 12, 2022
  • 2 replies
  • 2431 views

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++)?

2 replies

24-Ruby III
January 13, 2022

 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 

Lukasz111-GarnetAuthor
11-Garnet
January 18, 2022

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?

 

17-Peridot
January 20, 2022

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?

Lukasz111-GarnetAuthor
11-Garnet
January 28, 2022

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.

17-Peridot
January 28, 2022

Try this:

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

 

PS: what an error you get from ProEngineerConnect?