Creo Toolkit Guide
Introduction
- Creo Toolkit is an API (Application Development Interface) i.e a development library that enables to create applications that plug-in to Creo Parametric
- Creo Toolkit as an API enables ultimately users to create runtime applications
Getting Started with Creo Toolkit
- To have a start with Creo Parametric Customization APIs, users can refer and start with the Getting Started Guides and complete User Guide Documents
- These Guides can also be accessed from the Creo Parametric installation folders as shown below if the respective customization component is included during installation.
- Creo Load Point (CLP) : Install Directory of Creo
- Common File (CF) : CLP\Common Files
- Creo Load Point (CLP) : Install Directory of Creo
- Creo Toolkit: Creo_Toolkit_GSG.pdf
- Creo OTK C++: OTK_Cxx_GSG.pdf
- Creo OTK Java: OTK_Java_GSG.pdf
Installing Creo Toolkit
For Pro/ENGINEER Wildfire & Creo Elements/Pro 5.0 releases:
- Start Pro/ENGINEER or Creo Elements/Pro 5.0 installation
- Expand API Toolkits under Features to install on Define Installation Components page.
- Select Pro/TOOLKIT and select Install this feature.
- Complete the installation.
For Creo Parametric releases:
- Start Creo Parametric installation
- Select Install or add new software > Next > Sign Software License Agreement > Next > Select appropriate license input method or type source. Once status is seen “Available” > Next
- Click on Customize… > In Application Custom Setting window, click on Creo Parametric option on the left hand pane > In Application Features tab expand API Toolkits feature > Check option Creo Toolkit or PTC Creo Parametric TOOLKIT as shown in below image > OK
- Click Install button to complete installation.
- After successful installation, below listed folders will be observed in Creo Parametric Installation Folder:
- Please refer to Topic Installing Creo Parametric TOOLKIT under Creo Parametric TOOLKIT User’s Guide Chapter Fundamentals for more detailed information on the contents of these folders.
- If Creo installation folder is C:\Program Files\PTC\Creo6.0.3.0\
- tk will be C:\Program Files\PTC\Creo6.0.3.0\Common Files\protoolkit
- <tk>\includes :- Contains all required C header files (*.h) necessary for TOOLKIT Application development.
- <tk>\protk_appls:- The directory protk_appls contains sample Creo Parametric TOOLKIT applications. For more information regarding the sample applications refer to the Appendix on Sample Applications in Creo Parametric TOOLKIT User’s Guide
- <tk>\protkdoc :- Contains Creo Parametric TOOLKIT API Wizard files.
- Launch Page is <tk>\protkdoc\index.html
- <tk>\x86e_win64\obj :- Platform Specific folder. Contains..
- Sample Make files: Example: make_basic, make_examples, make_install, make_install_cxx etc.
- Unlocked Sample Application Dlls: Example: pt_examples.dll, pt_userguide.dll, pt_inst_test.dll etc.
- For more information, please refer to Creo Parametric TOOLKIT User’s Guide Chapter Creo Parametric TOOLKIT Sample Applications
- Static Libraries: Example: protoolkit_NU.lib, pt_asynchronous.lib, ucore.lib, udata.lib etc.
- protk_install_example.zip: Sample Make file based Visual Studio Project to compile pt_inst_test sample application
- pt_install_cxx.zip : Sample regular Visual Studio Project to compile pt_inst_test sample application.
- <tk>\Creo_Toolkit_GSG.pdf :- PDF format Guide for Getting Started with Creo Parametric TOOLKIT
- <tk>\Creo_Toolkit_RelNotes.pdf :- Creo Parametric TOOLKIT Release Notes
- <tk>\tkuse.pdf :- PDF format of Creo Parametric TOOLKIT User’s Guide
What is the Creo Parametric TOOLKIT API, aka the Pro/TOOLKIT API?
- Provides customers and third-parties the ability to expand Creo Parametric capabilities by writing C programming language code and then seamlessly integrating the resulting application into Creo Parametric.
- Provides a large library of C functions to provide the external application safe and controlled access to the Creo Parametric database and applications.
- Creo Parametric TOOLKIT is the primary PTC application programmer’s interface (API) for Creo Parametric and requires certain License Modules.
Creo Toolkit Customization Possibilities
Scheme that represents the coverage of Toolkit API vs the existing Creo Parametric capabilities
- The rule of thumb: Toolkit Support is likely when it can be performed from the User Interface (see above scheme)
- Inversely, if something cannot be performed from Creo User Interface, then it is also not available in the API in Toolkit, Object Toolkit, weblink, VB API or Jlink / OTK Java Free
- The API enables one to automate exclusively existing Creo UI commands
- The Toolkit execution does however not necessarily mirror identical functionality, for example a functionality performed with one click on the UI may need several function calls
- Creo Toolkit is no super mode of Creo with functions that would supersede what is possible from the UI
Creo Toolkit API Wizard
Toolkit API Wizard is available in the <path>. This provides the entire list of APIs available for Creo Toolkit functionalities
Determine which Toolkit API is available to achieve a specific functionality
- Search in Creo Parametric TOOLKIT API Wizard. Launch Page available at <tk>\protkdoc\index.html
- Open <tk>\protkdoc\index.html in a browser
- Select Creo Parametric TOOLKIT: API Wizard
- Use the search field at the top of the left pane to search for functions. Users can search using the following criteria:
- Search by API names
- Search using wildcard character *, where * (asterisk) matches zero or more nonwhite space characters
- The search displays the resulting API names with embedded links in a drop-down list. The deprecated APIs are highlighted in yellow.
- Use the below described Creo Toolkit naming convention to guess the required API name
- Creo Parametric TOOLKIT functions are named as per below two conventions
- Pro + Object + Action
- Pro + Object + Property + Action
- Example: Search and find the function name to save a given part / asm model
- As per the first naming convention rule, if we try guessing the possible function name for saving a model, it would be Pro + Model + Save (or store)
- Try the key words pro*save or pro*mdl*save
- Read the Description of the functions listed in the result.
- You will understand from the description that ProMdlSave() is the correct function to save a given model
- Similarly, try Pro*mdl*retrieve to find that the functions ProMdlRetrieve() & ProMdlnameRetrieve() can be used to Open a model in to Creo memory.
- Similarly try Pro*item*name*get to find that ProModelitemNameGet() can be used to Retrieve the name of the specified model item
- Creo Parametric TOOLKIT functions are named as per below two conventions
Registry File for Creo Toolkit
- Set protkdat option to your current session config.pro
- more about option protkdat with article
- prodev.dat (deprecated), now replaced by creotk.dat or protk.dat
- Store your protk.dat / registry file in one of the folders scanned by Creo at startup:
- The Creo starting directory
- <creo_loadpoint>\<datecode>\Common Files\$<machine_type>\text\<language>
- <creo_loadpoint>\<datecode>\Common Files\text
- <creo_loadpoint>\<datecode>\Common Files\text\<language>
- %ProgramData%\PTC\<Creo version>\Plugins subdirectories
- As a workaround, load the application manually by browsing:
- File > Tools > Auxiliary Application > Register > pick the .dat file
Conclusion
Creo Toolkit is a robust solution enabling Creo customers to implement and extend customized functionalities. With Creo Toolkit companies can significantly save time by automating repetitive, manual and quality sensitive tasks. Learn Creo Toolkit from PLM Coach and enhance your earning potential
Checkout our Other Resources
3DEXPERIENCE Enterprise Knowledge Language
————————————————–
🌍 For PLM / CAD Training Visit ► https://plmcoach.com
Follow PLM Coach on Social Media:
Facebook | Twitter | Pinterest
📧 Contact PLM Coach:
Follow the link to Training Inquiry Form to provide your details
Follow the link to Text PLM Coach on WhatsApp
☏ Mobile Number ► +91-7989703878
💌 Email ► [email protected]
————————————————–