General Functionality
To find the functions in Creo TOOLKIT that cover a particular area of functionality, scan the section appendix in this user’s guide, or use the Topical option in the Creo TOOLKIT browser. Beware of any difference in terminology from Pro/DEVELOP identified in the previous section.
If you want to find the
Creo TOOLKIT equivalent of a particular
Pro/DEVELOP function, refer to the table
Equivalent Pro/DEVELOP Functions. The table maps each
Pro/DEVELOP function to the closest equivalent
Creo TOOLKIT function (or functions).
In some functional areas, especially where Pro/DEVELOP provided good coverage, you can use the equivalent Creo TOOLKIT functions in an identical way, although the function names, return values, and sometimes the order of the arguments have been changed to conform to Creo TOOLKIT conventions.
For example, the following Pro/DEVELOP functions are almost exactly equivalent to the Creo TOOLKIT functions listed.
|
Pro/DEVELOP Function
|
Creo Toolkit Function
|
|
promenu_create()
|
|
|
promenu_expand()
|
|
|
promenu_on_button()
|
|
Other functions require more care, however. For example, one of the conventions of Creo TOOLKIT is that the input arguments come before the output arguments.
In some areas of functionality, traditional Pro/DEVELOP techniques have been replaced in Creo TOOLKIT by techniques that are more general, flexible, and consistent with the techniques used within Creo Parametric. A good example is the visit functions, which replace two different Pro/DEVELOP techniques. For example:
|
Pro/DEVELOP Function
|
Creo Toolkit Equivalent
|
|
prodb_get_feature_ids()
|
|
|
prodb_first_part_face(), prodb_next_part_face()
|
|
It is possible to use the
Creo TOOLKIT visit functions to create a utility that follows one of the
Pro/DEVELOP styles. An example is shown in the section
Expandable Arrays.
Some areas of Creo TOOLKIT functionality reveal a more general, and more consistent, view of the contents of the Creo Parametric database than that familiar to users of Pro/DEVELOP, and therefore require a slightly deeper understanding. For example, Creo TOOLKIT does not contain exact equivalents of the following Pro/DEVELOP functions for traversing the components of an assembly:
• prodb_first_member()
• prodb_next_member()
Assembly components (called “members” in
Pro/DEVELOP) are represented as features in the
Creo Parametric database, so these two functions can be replaced by a call to
ProSolidFeatVisit(), using
ProFeatureTypeGet() to identify the features of type
PRO_FEAT_COMPONENT. The feature identifier for an assembly component is identical to the member identifier used in
Pro/DEVELOP.
In the same way, the following Pro/DEVELOP functions that find datum planes and datum curves are also replaced by more generic functions in Creo TOOLKIT:
• prodb_first_datum()
• prodb_next_datum()
• prodb_get_datum_curves()
Here, too, the first step is to traverse the features using
ProSolidFeatVisit(). You can then traverse all the geometrical items in a feature using
ProFeatureGeomitemVisit(). Datum planes are geometry items of type
PRO_SURFACE, in features of type
PRO_FEAT_DATUM; datum curves are geometry items of type
PRO_CURVE, which can occur in features of many types.
This manual always explains the structure of the
Creo Parametric database wherever necessary, without assuming any prior knowledge of the
Pro/DEVELOP viewpoint. As shown in the previous examples, if you are converting a
Pro/DEVELOP application that traverses
Creo Parametric geometry, you should pay particular attention to the
Core: 3D Geometry section.
You can use Creo TOOLKIT functions to create utilities for the specific cases you need. Many such utilities are provided in the sample code located under the Creo TOOLKIT loadpoint.
Finally, Creo TOOLKIT covers whole new areas of functionality that were not supported at all by Pro/DEVELOP, such as the direct programmatic creation of features, including simple kinds of sketched features, datum planes, and manufacturing features. Some Pro/DEVELOP applications, especially those that create features using user-defined features (UDFs), and which customize Manufacturing, may therefore benefit from a complete redesign to take full advantage of Creo TOOLKIT.