Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi,
I am following the OTK_Cxx_GSG pdf documentation to test the ProTool Installation in my computer. Unfortunately, I don't understand the last step.
13. Run PTC Creo Parametric or PTC Creo Direct from the otk_install_app
directory that contains the prodev.dat file. The PTC Creo Object
TOOLKIT C++ application adds the command OTK Install Test on the Home
tab, in the OTK group, on the PTC Creo ribbon user interface.
what does that mean?
Also, is there a template out there that sets up all the necessary dependency to write a C++ project for PTC?
I have included the pdf file in this post.
Hi Marc -
I admit that I, too, was a little confused by this statement in the OTK C++ documentation:
13. Run PTC Creo Parametric or PTC Creo Direct from the otk_install_app directory that contains the prodev.dat file.
First, when discussing computer file systems, the word "directory" is the older and more formal term for "folder". Both words generally mean the same thing.
PTC provides a sample Visual Studio project, but they're trying to support Visual Studio on two platforms: Windows 32-bit and Windows 64-bit. For that reason, they put the sample Visual Studio project in the "platform-specific" folder. If you're using Windows 64-bit, like me, that folder is:
Common Files\otk\otk_cpp\x86e_win64\obj
You should find a zip file named otk_install.zip underneath there. Unpack that zip file into a folder where you are free to edit and delete files.
One of the folders inside the zip file is named otk_install_app. The instructions above say that you should use a .bat file to launch Creo from that folder. The reason for that is so that it will read the prodev.dat file in that folder. There are other ways to make your OTK program visible to Creo, but I'll give you a chance to do this PTC's way first.
Also, is there a template out there that sets up all the necessary dependency to write a C++ project for PTC?
I think the Visual Studio project in the zip file is the "template" you're looking for. Let us know if you were looking for something else.
|+| M a r k |+|
Hi Mark,
Thanks for the reply,
What is the "PTC way" to launch parametric from this folder with the .bat file as input? I have a hard time finding any documentation on this.
Also for the template, when I move the otk_install from it's original location folder it breaks all the dependencies since they are all in relative path. Do you guys use a template wizard to create a C++ add on?
Cheers,
Marc
Marc -
Attached is a zip file containing a modified version of PTC's Visual Studio solution for otk_install on Creo 3.0. It includes the following changes:
Experiment with this file and see if it helps you get OTK running. Remember that you will need licenses for both Creo Parametric Toolkit (Pro/Toolkit) and OTK C++.
What is the "PTC way" to launch parametric from this folder with the .bat file as input? I have a hard time finding any documentation on this.
I was speaking loosely when I wrote that. PTC apparently expects you to test otk_install by launching Creo Parametric from a Command Prompt window that has otk_install as the active directory. They also expect you to build the program in the original otk_install folder in your Creo Parametric installation. I think that's a bad idea to create, delete and modify the files installed with an application.
I suggest that you use build your application in a way that does not reference the OTK C++ libraries using relative pathnames like "../$PRO_MACHINE_TYPE/obj/otk_examples_dll.dll".
Good luck with this -
|+| M a r k |+|