Pro/TOOLKIT

If you locate on the internet any website that shows Pro/TOOLKIT code, please let me know. Until then, what you can find here is the only oasis in the desert. It contains some of the code fragments that I have written in the past years. I will be adding more when time permits. They will be given in a trimmed form for obvious proprietary reasons. Nevertheless, the code will contain enough to educate those of you who are just starting to work with Pro/TOOLKIT.

I don't have a sense of the size of the community that uses this product, but I suspect that it is fairly small. Nevertheless, I expect that those of us who are involved with writing Pro/TOOLKIT functions should benefit from the information presented here.

Since 1998 I have done a number of projects that are novel in their usage of Pro/TOOLKIT. Therefore, besides regular toolkit functions, I will include the discussion about these excursions as well.

Various Pro/TOOLKIT functions ...

  • Highlight edges that have a radius smaller than some critical radius. The need to do that arises in sheet metal applications where smaller radii in bands are not desirable. The usual way of going about things like this is to visit all the surfaces on the part, then all of the contours on each surface and finally all of the edges on the contours. This is what you can find in the Pro/TOOLKIT guide. However, the drawback of that approach is that you visit all the edges twice. To avoid this my approach given here is to visit all of the features on the part and then visit all geomitems to extract geometrical information.
  • In my opinion working with Pro/TOOLKIT menus is a bit difficult. A newcomer must plan a serious allocation of time for this. Here is a simple example for practice.
  • "Notification" process is a bit wordy in Pro/TOOLKIT user guide and sample code is not easy to decipher because it is a part of a large application. I think that a simple example where it is easy to see how things need to be done is more beneficial. I believe in an inductive way of learning so here is one example.
  • How to create a Windows DLL with Pro/TOOLKIT code in it and use it with Visual Basic? This is not supported by PTC, but it can be done. At least one Pro/TOOLKIT function doesn't work which is ProEngineerStart(), but you can connect to Pro/E with ProEngineerConnect(). Here is a simple example.
  • Selection process may get involved sometimes. There are a lot of parameters that one needs to think about. To get you started here is a simple function that lets a user select edges on a part and then returns the total length of edges selected.
  • A number of new user experience a lot of problems initially with setting up Pro/TOOLKIT projects in MS Visual Studio. Therefore, for a long time I wanted to provided template projects which can be used without spending hours of setting up compiler switches that work with toolkit libraries. Here you can find 2 VC++.NET projects that can be built without problems.
  • This article is designed to get newcomers started in understanding and using Pro/TOOLKIT. It was published in www.caddigest.com orginaly but now it is not available there anymore.
  • In Pro/TOOLKIT documentation there are no examples how to use UDF functions, so here is an article to fill this gap.

NOTE: I can only answer specific questions with regards to the articles I wrote (if I have time), and nothing else.