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

Creo Object Toolkit C++

SOLVED
Garnet

Creo Object Toolkit C++

Hello community!! I read about how object toolkit c++ works and I have a query related to it. If I am not wrong visual studio is used as IDE/compiler to write, compile and run object toolkit c++ application code and link with object toolkit c++ libraries. Or is there an IDE/compiler of creo object toolkit c++ to compile and run the programs of object toolkit? I am confused regarding the role of otk_install_app, creotk.dat file and otk_install.sln directory which specifies visual studio solution. Awaiting your replies and suggestions...

Regards,

Rohan

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Creo Object Toolkit C++

Hi, 

 

Yep, you are correct! Visual Studio is the compiler/IDE of choice for OTK Toolkit. 

 

To answer your questions:

  1. otk_install_app
    • This is an example application provided by PTC, it has a few example applications, and if I remember correctly, I believe it has the source code to match as well. It's a great resource for learning!

  2. creotk.dat
    • The ".dat" file is the way to get Creo Parametric to load your toolkit applications. You can  The name of the .dat file does not matter at all (for instance, we call ours, "cadactive.dat") 
    • The "manual" way to load the Toolkit application is through the "Aux Applications" button in the ribbon of Creo P
    • The "automatic" way to load the Toolkit application (where the app is loaded when Creo loads) is to configure a config.pro setting for "creotkdat" (or "protkdat") to point to the ".dat" file that you have created.
    • The file only contains a few required lines - which point to the binary (the DLL or EXE) as well as the "TXT Directory" (which is used for any resources required for your toolkit application, such as images, icons, GUI resource files, etc)

  3. otk_install.sln 
    • This is an example visual studio solution created by PTC. If I remember correctly, you should only really need to set a windows Environment Variable in order to get the solution to recognize the C++ libraries and Header Files.
    • Otherwise, to start a new Visual Studio project from scratch, you can set the project properties (or create Visual Studio Property Sheets) to point to the required folders and settings.

 

Another thing to note, is that you'll need the correct VERSION of Visual Studio.

  • Creo 2 = Visual Studio 2010
  • Creo 3 = Visual Studio 2012
  • Creo 4 & 5 = Visual Studio 2015

You can still USE a newer version of Visual Studio (such as VS 2017), however the "Platform Toolset" used to compile against the PTC libraries in the project will need to be per the appropriate version of Creo.

 

Hope this helps!

 

Thanks,

James Sullivan

President & Founder
CadActive Technologies - www.cadactive.com

View solution in original post

4 REPLIES 4

Re: Creo Object Toolkit C++

Hi, 

 

Yep, you are correct! Visual Studio is the compiler/IDE of choice for OTK Toolkit. 

 

To answer your questions:

  1. otk_install_app
    • This is an example application provided by PTC, it has a few example applications, and if I remember correctly, I believe it has the source code to match as well. It's a great resource for learning!

  2. creotk.dat
    • The ".dat" file is the way to get Creo Parametric to load your toolkit applications. You can  The name of the .dat file does not matter at all (for instance, we call ours, "cadactive.dat") 
    • The "manual" way to load the Toolkit application is through the "Aux Applications" button in the ribbon of Creo P
    • The "automatic" way to load the Toolkit application (where the app is loaded when Creo loads) is to configure a config.pro setting for "creotkdat" (or "protkdat") to point to the ".dat" file that you have created.
    • The file only contains a few required lines - which point to the binary (the DLL or EXE) as well as the "TXT Directory" (which is used for any resources required for your toolkit application, such as images, icons, GUI resource files, etc)

  3. otk_install.sln 
    • This is an example visual studio solution created by PTC. If I remember correctly, you should only really need to set a windows Environment Variable in order to get the solution to recognize the C++ libraries and Header Files.
    • Otherwise, to start a new Visual Studio project from scratch, you can set the project properties (or create Visual Studio Property Sheets) to point to the required folders and settings.

 

Another thing to note, is that you'll need the correct VERSION of Visual Studio.

  • Creo 2 = Visual Studio 2010
  • Creo 3 = Visual Studio 2012
  • Creo 4 & 5 = Visual Studio 2015

You can still USE a newer version of Visual Studio (such as VS 2017), however the "Platform Toolset" used to compile against the PTC libraries in the project will need to be per the appropriate version of Creo.

 

Hope this helps!

 

Thanks,

James Sullivan

President & Founder
CadActive Technologies - www.cadactive.com

View solution in original post

Re: Creo Object Toolkit C++

Hi Mr. Sullivan,

 

You`ve mentioned using the correct "Platform Toolset", but what is it exactly?

 

My team is having similar issues, and the knowledge would we much appreciated.

 

Thanks in advance!

Highlighted

Re: Creo Object Toolkit C++


@sully7 wrote:

Hi, 

 

Yep, you are correct! Visual Studio is the compiler/IDE of choice for OTK Toolkit. 

 

To answer your questions:

  1. otk_install_app
    • This is an example application provided by PTC, it has a few example applications, and if I remember correctly, I believe it has the source code to match as well. It's a great resource for learning!

  2. creotk.dat
    • The ".dat" file is the way to get Creo Parametric to load your toolkit applications. You can  The name of the .dat file does not matter at all (for instance, we call ours, "cadactive.dat") 
    • The "manual" way to load the Toolkit application is through the "Aux Applications" button in the ribbon of Creo P
    • The "automatic" way to load the Toolkit application (where the app is loaded when Creo loads) is to configure a config.pro setting for "creotkdat" (or "protkdat") to point to the ".dat" file that you have created.
    • The file only contains a few required lines - which point to the binary (the DLL or EXE) as well as the "TXT Directory" (which is used for any resources required for your toolkit application, such as images, icons, GUI resource files, etc)

  3. otk_install.sln 
    • This is an example visual studio solution created by PTC. If I remember correctly, you should only really need to set a windows Environment Variable in order to get the solution to recognize the C++ libraries and Header Files.
    • Otherwise, to start a new Visual Studio project from scratch, you can set the project properties (or create Visual Studio Property Sheets) to point to the required folders and settings.

 

Another thing to note, is that you'll need the correct VERSION of Visual Studio.

  • Creo 2 = Visual Studio 2010
  • Creo 3 = Visual Studio 2012
  • Creo 4 & 5 = Visual Studio 2015

You can still USE a newer version of Visual Studio (such as VS 2017), however the "Platform Toolset" used to compile against the PTC libraries in the project will need to be per the appropriate version of Creo.

 

Hope this helps!

 

Thanks,

James Sullivan


Hello all,

The following articles may clear a confusion about platform toolsets, compilers and linkers, at least somewhat...

https://devblogs.microsoft.com/cppblog/use-any-c-compiler-with-visual-studio/

https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/platform-toolset

https://devblogs.microsoft.com/cppblog/visual-studio-build-tools-now-include-the-vs2017-and-vs2015-m...

 

The bottom line is : as long as Creo's version appropriate  MSVC (microsoft visual C++ compiler) and MSBuild version would be used, the correct byte code for Creo would be produced. 

 

In today's development environment we have some options to choose when it comes to IDE's.

My personal preference for Creo 4 is 'Visual Studio Code' with C++ extension and vs2015 toolsets for compiler and linker. Having VS remote debugger 2015 also helps.

HIH.

FV.  

  

Re: Creo Object Toolkit C++

Hi @sully7 ,

 

Can i compile Creo 2.0 protoolkit application using Visual studio 2015?

 

Thanks in advance.

 

Regards,

Harsh