User Interface: Curve and Surface Collection
This section describes the Creo TOOLKIT functions to access the details of curve and surface collections for query and modification. Curve and surface collections are required inputs to a variety of Creo Parametric tools such as Round, Chamfer, and Draft.
Introduction to Curve and Surface Collection
A curve collection or chain is a group of separate edges or curves that are related, for example, by a common vertex, or tangency. Once selected, these separate entities are identified as a chain so they can be modified as one unit.
The different chain types are as follows:
•  One-by-one—a chain of edges, curves or composite curves, each adjacent pair of which has a coincident endpoint. Some applications may place other conditions on the resulting chain.
•  Tangent—a chain defined by the selected item and the extent to which adjacent entities are tangent.
•  Curve—an entire composite curve or some portion of it that is defined by two component curves of the curve.
•  Boundary—an entire loop of one-sided edges that bound a quilt or some portion thereof defined by two edges of the boundary loop.
•  Surf Chain—an entire loop of edges that bound a face (solid or surface) or some portion of it that is defined by two edges of the loop.
•  Intent Chain—an intent chain entity, usually created as the result of two intersecting features.
•  From/To—a chain that begins at a start-point, follows an edge line, and ends at the end-point.
Surface sets are one or more sets of surfaces either for use within a tool, or before entering a tool.
The definition of a surface set may not be independent in all respects from that of any other. In other words, the ability to construct some types of surface sets may depend on the presence of or on the content of others. On this account, we have different surface sets as follows:
•  One-by-One Surface Set—Represents a single or a set of single selected surfaces, which belong to solid or surface geometry.
•  Intent Surface Set—Represents a single or set of intent surfaces, which are used for the construction of the geometry of features. This instruction facilitates the reuse of the feature construction surface geometry as "intent" reference. This is also known as "logical object surface set".
•  All Solid or Quilt Surface Set—Represents all the solid or quilt surfaces in the model.
•  Loop Surface Set—Represents all the surfaces in the loop in relation with the selected surface and the edge. This is also known as "neighboring surface set".
•  Seed and Boundary Surface Set—Represents all the surfaces between the seed surface and the boundary surface, excluding the boundary surface itself.
Surface set collection can be identified as a gathering a parametric set of surfaces in the context of a tool that specifically requests surface sets and is nearly identical to selection of a surface set.
Chain collection can be identified as a gathering a chain in the context of a tool that specifically requests chain objects and is nearly identical to chain selection.
Collection is related to Selection as follows:
Selection is the default method of interaction with Creo Parametric system. Selection is performed without the context of any tool. In other words, the system does not know what to do with selected items until the user tells the system what to do. Collection is essentially Selection within the context of a tool. Items are gathered for a specific use or purpose as defined by the tool, which forms the Collection. It is possible to convert the collections into the sets of selections using the collection APIs.
The ProCollection object
A ProCollection object is an opaque pointer to a structure in which a surface or curve collection is stored. It represents a chain or surface set and extracts the details from an appropriate structure from Creo Parametric.
Interactive Collection
Functions Introduced:
Use the function ProCurvesCollect() to interactively create a collection of curves by invoking a chain collection user interface.
Chain collection User Interface
Image
Use the function ProSurfacesCollect() to interactively create a collection of surfaces by invoking a surface sets dialog.
Surface Sets dialog box
Image
For the functions ProCurvesCollect() and ProSurfacesCollect() the input arguments are as follows:
•  types—Specifies an array defining the permitted instruction types. The following instruction types are supported:
  PRO_CHAINCOLLUI_ONE_BY_ONE—for creating "One by One" chain.
  PRO_CHAINCOLLUI_TAN_CHAIN—for creating "Tangent" chain.
  PRO_CHAINCOLLUI_CURVE_CHAIN—for creating "Curve" chain.
  PRO_CHAINCOLLUI_BNDRY_CHAIN—for creating "Boundary Loop" chain.
  PRO_CHAINCOLLUI_FROM_TO—for creating "From-To" chain.
  PRO_CHAINCOLLUI_ALLOW_LENGTH_ADJUSTMENT—for allowing length adjustment in curves.
  PRO_CHAINCOLLUI_ALLOW_ALL—for allowing all the supported instruction types.
  PRO_CHAINCOLLUI_ALLOW_EXCLUDED—for excluding chain.
  PRO_CHAINCOLLUI_ALLOW_APPENDED—for appending chain.
•  n_types—Specifies the size of the types array.
•  filter_func—Specifies the filter function. The filter function is called before each selection is accepted. If your application wishes to reject a certain selection, it can return an error status from this filter. You may pass NULL to skip the filter.
•  app_data—Specifies the application data that will be passed to filter_func. You may pass NULL when this is not required.
•  collection—Specifies the collection object where the results will be stored. This should be preallocated using ProCollectionAlloc() (for ProCurvesCollect()) and ProSrfcollectionAlloc() (for ProSurfacesCollect()) respectively. The collection properties and instructions will be stored in this handle after the call to the functions ProCurvesCollect() and ProSurfacesCollect(). Use the functions for programmatic access to curve and surface collections and to extract the required information.
The output arguments are as follows:
•  sel_list—Specifies a pointer to an array of ProSelection objects describing the current resulting curves and edges or surfaces resulting from the collection. You may pass NULL if you are not currently interested in the results of the collection.
•  n_sel—Specifies the number of entries in sel_list.
Accessing Collection object from Selection Buffer
Function Introduced:
The selection buffer stores chain and surface collections using a special mechanism. The function ProSelectionCollectionGet() can be used to extract the ProCollection object from a ProSelection. The function ProSelectionCollectionGet() may fail due to the following conditions:
•  PRO_TK_INVALID_TYPE—The selection object does not contain a collection.
•  PRO_TK_INVALID_PTR—The selection object contains a chain, but this chain reference is no longer valid. Chain references contained in ProSelections are only valid for as long as the chain is selected in the selection buffer.
Note
It is recommended to extract the ProCollection object from the ProSelection before it can be cleared from the selection buffer.
Adding a Collection Object to the Selection Buffer
Function Introduced:
Use the function ProSelbufferCollectionAdd() to add a chain or surface collection to the active selection buffer. The function ProSelbufferCollectionAdd() may fail due to the following conditions:
•  PRO_TK_INVALID_ITEM—The collection does not correctly reference the current model.
•  PRO_TK_NOT_DISPLAYED—The collection contains one or more items that are not currently displayed (for example, due to inactive geometry) and so cannot be added to the buffer.
•  PRO_TK_BAD_CONTEXT—The selection cannot be added to the buffer in combination with one or more objects that are already in the buffer (for example geometry and features selected at the same time).
For further information on related functions, refer to the section Selection Buffer of User Interface: Selection.
Programmatic Access to Collections
A ProCollection object may be returned from some indeterminate contexts or functions, however it can only be one of the following types:
•  PRO_COLLECTION_LEGACY—legacy curve collection type (generated by ProCurvesCollect() or a superseded function like ProCollectionAlloc().
•  PRO_COLLECTION_SRFCOLL—surface collection type.
•  PRO_COLLECTION_CRVCOLL—curve collection type.
Function Introduced:
Use the function ProCollectionTypeGet()ProCollectionType
Contents of Curve Collection
Functions Introduced:
Use the function ProCrvcollectionInstructionsGet() to get the instructions from the curve collection.
Use the function ProCrvcollinstrTypeGet() to get the curve collection instruction type.
Curve collection instructions can be of the following types:
•  PRO_CURVCOLL_EMPTY_INSTR—to be used when you do not want to pass any other instruction.
•  PRO_CURVCOLL_ADD_ONE_INSTR—for creating "One by One" chain.
•  PRO_CURVCOLL_TAN_INSTR—for creating "Tangent" chain.
•  PRO_CURVCOLL_CURVE_INSTR—for creating "Curve" chain.
•  PRO_CURVCOLL_SURF_INSTR—for creating "Surface Loop" chain.
•  PRO_CURVCOLL_BNDRY_INSTR—for creating "Boundary Loop" chain.
•  PRO_CURVCOLL_LOG_OBJ_INSTR—for creating "Logical Object" chain.
•  PRO_CURVCOLL_PART_INSTR—for creating chain on all possible references, or to choose from convex or concave only.
•  PRO_CURVCOLL_FEATURE_INSTR—for creating chain from feature curves.
•  PRO_CURVCOLL_FROM_TO_INSTR—for creating "From-To" chain.
•  PRO_CURVCOLL_EXCLUDE_ONE_INSTR—for excluding the entity from the chain.
•  PRO_CURVCOLL_TRIM_INSTR—to trim chain.
•  PRO_CURVCOLL_EXTEND_INSTR—to extend chain.
•  PRO_CURVCOLL_START_PNT_INSTR—to set the chain start point.
•  PRO_CURVCOLL_ADD_TANGENT_INSTR—to add all edges tangent to the ends of the chain.
•  PRO_CURVCOLL_ADD_POINT_INSTR—to add selected point or points to the collection.
•  PRO_CURVCOLL_OPEN_CLOSE_LOOP_INSTR—to add a closed chain that is considered as open.
•  PRO_CURVCOLL_QUERY_INSTR—for creating “Query” chain.
•  PRO_CURVCOLL_CNTR_INSTR—to add contours to the collection.
•  PRO_CURVCOLL_SRFS_BNDRY_INSTR—to collect boundary of the given set of surfaces.
•  PRO_CURVCOLL_SRFS_BNDRY_ADJ_INSTR—to collect edges adjacent to the boundary of the given surfaces.
•  PRO_CURVCOLL_SKET_ADD_ONE_INSTR—for creating “One by One” in sketcher.
•  PRO_CURVCOLL_SKET_FROM_TO_INSTR—for creating “From-to” sketcher chain.
•  PRO_CURVCOLL_RESERVED_INSTR—to determine the number of instructions defined in the curve instruction.
Use the function ProCrvcollinstrAttributeIsSet() to check whether a special attribute is set for the curve collection instruction.
The curve collection instruction attributes can be of the following types:
•  PRO_CURVCOLL_NO_ATTR—applicable when there are no attributes present.
•  PRO_CURVCOLL_ALL—applicable for all edges.
•  PRO_CURVCOLL_CONVEX—applicable for convex edges only.
•  PRO_CURVCOLL_CONCAVE—applicable for concave edges only.
Use the function ProCrvcollinstrReferencesGet() to get the references contained in a curve collection instruction.
Use the function ProCrvcollinstrValueGet() to get the value of a curve collection instruction. This is valid for instructions of PRO_CURVCOLL_TRIM_INSTR and PRO_CURVCOLL_EXTEND_INSTR type.
Use the function ProCrvcollinstrFree() to release a curve collection instruction.
Use the function ProCrvcollinstrArrayFree() to release the ProArray of curve collection instructions.
Creation and Modification of Curve Collections
Functions Introduced:
Use the function ProCrvcollectionAlloc() to allocate a curve collection.
Use the function ProCrvcollectionCopy() to copy a curve collection which is a newly allocated collection object internally and can be freed from memory using the function ProCollectionFree().
Note
ProCrvcollectionCopy() function should be used to convert the collection object returned by ProCurvesCollect() to a PRO_COLLECTION_CRVCOLL type of collection so that it can be used by the curve collection access functions.
Use the function ProCrvcollectionInstructionAdd() to add an instruction to a curve collection.
Use the function ProCrvcollectionInstructionRemove() to remove an instruction from a curve collection.
Use the function ProCrvcollinstrAlloc()to allocate a curve collection instruction.
Use the function CrvcollinstrAttributeSet() to add an attribute to the curve collection instruction.
Use the function ProCrvcollinstrAttributeUnset() to remove an attribute of a curve collection instruction.
Use the function ProCrvcollinstrReferenceAdd() to add a reference to curve collection instruction references.
Use the function ProCrvcollinstrReferenceRemove() to remove a reference to curve collection instruction.
Use the function ProCrvcollinstrValueSet() to set value of the curve collection instruction.
Use the function ProCrvcollectionRegenerate() to generate an array of objects based on the rules and information in the collection.
Contents of Surface Collection
Functions Introduced:
Use the function ProSrfcollectionInstructionsGet() to get an array of instructions assigned to the surface collection.
Use the function ProSrfcollinstrTypeGet() to get the type of surface collection instruction.
Surface collection instructions can be of the following types:
•  PRO_SURFCOLL_SINGLE_SURF—Instruction specifying a set of single surfaces.
•  PRO_SURFCOLL_SEED_N_BND—Instruction specifying a combination of Seed and Boundary type of surfaces.
•  PRO_SURFCOLL_SEED_N_BND_INC_BND—Instruction specifying a combination of Seed and Boundary type of surfaces and also includes the seed surfaces.
•  PRO_SURFCOLL_QUILT_SRFS—Instruction specifying quilt type of surfaces.
•  PRO_SURFCOLL_ALL_SOLID_SRFS—Instruction specifying all solid surfaces in the model.
•  PRO_SURFCOLL_NEIGHBOR—Instruction specifying neighbor type of surfaces (boundary loop).
•  PRO_SURFCOLL_NEIGHBOR_INC—Instruction specifying neighbor type of surfaces (boundary loop) and also includes the seed surfaces.
•  PRO_SURFCOLL_LOGOBJ_SRFS—Instruction specifying intent surfaces. Intent surfaces are also known as "logical objects".
•  PRO_SURFCOLL_GEOM_RULE—— Instruction specifying collection of surfaces using geometry rules.
•  PRO_SURFCOLL_SHAPE_BASED—Instruction specifying collection of shape based surfaces.
•  PRO_SURFCOLL_TANG_SRF—Instruction specifying collection of tangent surfaces.
The following flags are used as an input to ProSurfacesCollect and drive its behavior of the interactive collection.
•  PRO_SURFCOLL_DISALLOW_QLT—Do not allow selections from quilts.
•  PRO_SURFCOLL_DISALLOW_SLD—Do not allow selections from solid geometry.
•  PRO_SURFCOLL_DONT_MIX—Allow selections from only solid or only quilt but no mixing.
•  PRO_SURFCOLL_SAME_SRF_LST—Allow selections from same solid or same quilt.
•  PRO_SURFCOLL_USE_BACKUP—Prompts Creo Parametric to regenerate using backups.
•  PRO_SURFCOLL_DONT_BACKUP—Do not back up copy of references.
•  PRO_SURFCOLL_DISALLOW_LOBJ—Do not allow selections from intent surfaces or logical objects.
•  PRO_SURFCOLL_ALLOW_DTM_PLN—Allows datum plane selection. It is not supported in Pro/ENGINEER Wildfire 2.0.
Use the function ProSrfcollinstrIncludeGet() to check whether the include flag of the surface collection instruction is set. If the include flag is PRO_B_TRUE, the surfaces generated by this instruction add surfaces to the overall set. If the include flag is PRO_B_FALSE, the surfaces generated by this instruction are removed from in the overall set.
Use the function ProSrfCollinstrInfoGet() to get the information about the bit flags from the surface collection instruction. For more information on bit flags, see the function ProSrfCollinstrInfoSet() in the section Creation and Modification of Surface Collections.
Use the function ProSrfcollinstrReferencesGet() to get the references contained in a surface collection instruction.
Use the function ProSrfcollinstrArrayFree() to free a ProArray of surface collection reference handles.
Use the function ProSrfcollinstrFree() to release the surface collection instructions.
Use the function ProSrfcollrefTypeGet() to get the type of reference contained in the surface collection reference.
Surface collection references can be of the following types:
•  PRO_SURFCOLL_REF_SINGLE—Specifying the collection reference belonging to the "single surface set" type of instruction. This type of reference can belong to single surface type of instruction.
•  PRO_SURFCOLL_REF_SINGLE_EDGE—Specifying the collection reference belonging to the an "single surface set" edge type of instruction.
•  PRO_SURFCOLL_REF_SEED—Specifying the collection reference to be the seed surface. This type of reference can belong to seed and boundary type of instruction.
•  PRO_SURFCOLL_REF_SEED_EDGE—Specifying the collection reference of seed edge type. This type of reference can belong to seed and boundary type of instruction.
•  PRO_SURFCOLL_REF_BND—Specifying the collection reference to be a boundary surface. This type of reference can belong to seed and boundary type of instruction.
A single seed and boundary type of instruction will have at least one of each seed and boundary type of reference.
•  PRO_SURFCOLL_REF_NEIGHBOR—Specifying the collection reference to be of neighbor type. This type of reference belongs neighbor type of instruction.
•  PRO_SURFCOLL_REF_NEIGHBOR_EDGE—Specifying the collection reference of neighbor edge type. This type of reference belongs to neighbor type of instruction.
A neighbor type of instruction will have one neighbor and one neighbor edge type of reference.
•  PRO_SURFCOLL_REF_GENERIC—Specifying the collection reference to be of generic type. This type of reference can belong to intent surfaces , quilt and all-solid type of instructions.
Use the function ProSrfcollrefArrayFree() to free a ProArray of surface collection reference handles.
Use the function ProSrfcollrefFree() to free a surface collection reference handle.
Use the function ProSrfcollrefItemGet() to get the geometry item contained in the surface collection reference.
Creation and Modification of Surface Collections
Functions Introduced:
Use the function ProSrfcollectionAlloc() to allocate a surface collection.
Use the function ProSrfcollectionCopy() to copy a surface collection into a newly allocated ProCollection handle.
Use the function ProSrfcollectionInstructionAdd() to add an instruction to surface collection.
Use the function ProSrfcollectionInstructionRemove() to remove the instructions from surface collections.
The function ProSrfcollectionInstructionRemove() may fail due to invalid index specifications for the instruction or if the collection contains instruction for curves.
Use the function ProSrfcollinstrAlloc() to allocate a surface collection instruction.
Use the function ProSrfcollinstrIncludeSet() to set the include flag for a surface collection instruction.
Note
In the functions ProSrfcollinstrAlloc() and ProSrfcollinstrIncludeSet() to exclude the surfaces generated in the collection instruction pass the input arguments as follows:
•  Specify the surface collection instruction as PRO_SURFCOLL_SINGLE_SURF.
•  Specify the include argument as PRO_B_FALSE.
Use the function ProSrfCollinstrInfoSet() to set the information about the bit flags in the surface collection instruction. You can pass the bit maps information as bitmask containing one or more bit flags.
The following bit flags can be passed as input argument:
•  PRO_SURFCOLL_ALL_GEOM_RULE—Specifies that when this flag is included with other rule flags, all the rules are applied. Otherwise, any applicable geometry rule is applied.
•  PRO_SURFCOLL_CO_PLANNAR_GEOM_RULE—Specifies that the surfaces coplanar to the seed surface should be collected.
•  PRO_SURFCOLL_PARALLEL_GEOM_RULE—Specifies that the surfaces parallel to the seed surface should be collected.
•  PPRO_SURFCOLL_CO_AXIAL_GEOM_RULE—Specifies that the surfaces coaxial with the seed surface should be collected.
•  PRO_SURFCOLL_EQ_RADIUS_GEOM_RULE—Specifies that the surfaces with the same radius and type as the seed surface should be collected.
•  PRO_SURFCOLL_SAME_CONVEXITY_GEOM_RULE—Specifies that the surfaces that have the same convexity and type as the seed surface should be collected.
Note
The bit flags PRO_SURFCOLL_ALL_GEOM_RULE, PRO_SURFCOLL_CO_PLANNAR_GEOM_RULE, PRO_SURFCOLL_PARALLEL_GEOM_RULE, PRO_SURFCOLL_CO_AXIAL_GEOM_RULE, PRO_SURFCOLL_EQ_RADIUS_GEOM_RULE, and PRO_SURFCOLL_SAME_CONVEXITY_GEOM_RULE are related to PRO_SURFCOLL_GEOM_RULE, that is, the geometry rule surface set.
•  PRO_SURFCOLL_SHAPE_CHAMFER—Collects surfaces with chamfered edges. If used alone then only primary chamfer shapes are added to the collection set.
•  PRO_SURFCOLL_SHAPE_ROUND—Collects surfaces with round shape. If used alone then only the primary round shapes are added to the collection set.
•  PRO_SURFCOLL_SHAPE_PROTR_BOSS—Collects surfaces of the type boss. The protrusion surfaces with the secondary shapes are also added to the set.
•  PRO_SURFCOLL_SHAPE_PROTR_RIB—Collects surfaces of the type rib. The protrusion surfaces without the secondary shapes are added to set.
•  PRO_SURFCOLL_SHAPE_CUT_POCKET—Collects cut surfaces with the secondary shapes.
•  PRO_SURFCOLL_SHAPE_CUT_SLOT—Collects cut surfaces without the secondary shapes being added to set.
•  PRO_SURFCOLL_SHAPE_MORE_SHAPES—Use this flag only with PRO_SURFCOLL_SHAPE_CHAMFER and PRO_SURFCOLL_SHAPE_ROUND to add the secondary chamfer and round shapes to the surface set.
Note
The bit flags PRO_SURFCOLL_SHAPE_ROUND, PRO_SURFCOLL_SHAPE_PROTR_BOSS, PRO_SURFCOLL_SHAPE_PROTR_RIB, PRO_SURFCOLL_SHAPE_CUT_POCKET, PRO_SURFCOLL_SHAPE_CUT_SLOT, PRO_SURFCOLL_SHAPE_MORE_SHAPES and PRO_SURFCOLL_SHAPE_CHAMFER are related to PRO_SURFCOLL_SHAPE_BASED, that is, the shape surface set.
•  PRO_SURFCOLL_TANGENT_NEIGBOURS_ONLY—Specifies that the surfaces that have at least one tangent edge with another surface in the tangent surface set, starting from the seed surface should be collected.
Note
The bit flag PRO_SURFCOLL_TANGENT_NEIGBOURS_ONLY is related to PRO_SURFCOLL_TANG_SRF, that is, the tangent surface set.
•  PRO_SURFCOLL_SEEDNBOUND_STRONG_REFS—Specifies that the boundary surfaces are considered as strong surfaces. This bit flag is related to PRO_SURFCOLL_SEED_N_BND and PRO_SURFCOLL_SEED_N_BND_INC_BND. If the selected references is missing, the feature will fail.
Note
•  Before you call ProSrfCollinstrInfoSet() function, you must set the include flag (PRO_B_TRUE / PRO_B_FALSE) for the surface collection instruction using the ProSrfcollinstrIncludeSet().
•  For the geometry based, the shape based, and the tangent based surface collections, the surface collection reference type (first input argument to the function ProSrfcollrefAlloc()) must be PRO_SURFCOLL_REF_SEED.
•  If you want to apply all the geometry rule flags included in the info argument of the function ProSrfCollinstrInfoSet(), the flag PRO_SURFCOLL_ALL_GEOM_RULE must be included in info argument. If you do not include the PRO_SURFCOLL_ALL_GEOM_RULE flag, any of the geometry rule flags will be applied.
Use the function ProSrfcollinstrReferenceAdd() to add a reference to the surface collection instruction.
Use the function ProSrfcollinstrReferenceRemove() to remove a reference from the surface collection instruction.
Use the function ProSrfcollectionRegenerate() to generate an array of objects based on the rules and information in the collection.
Access of Collection Object from Feature Element Trees
Functions Introduced:
Use the function ProElementCollectionGet() to extract a collection object from an element of a feature element tree of the following types:
•  PRO_E_STD_CURVE_COLLECTION_APPL
•  PRO_E_STD_SURF_COLLECTION_APPL
Use the function ProElementCollectionSet() to assign a collection object into the appropriate elements of the above mentioned types.
Note
Point collections (PRO_E_POINT_COLLECTION_APPL) are accessed from the element as normal ProReference object—by using ProElementReferenceGet() and ProElementReferenceSet() APIs.
Use the function ProElementCollectionProcess() to generate a list of geometric items in the form of array of ProReference object constituting the collection. It returns a ProArray of the selected curves, edges, or surfaces that exist in the collection owned by the element. This function differs from ProCrvcollectionRegenerate() and ProSrfcollectionRegenerate() because those functions generate a list of collected entities based on standard rules. The function ProElementCollectionProcess(), if applied to a collection element from a given feature, will use the feature's rules to process the collection and return the exact geometric entities used by the feature.
Note
If this element is extracted from an existing feature tree using ProFeatureElemtreeExtract(), the returned reference_array will be on the basis of the feature rules. On the other hand, if this element is newly created and not yet assigned to a feature, then the returned reference_array will be as per the default rules.
Programmatic Access to Legacy Collections
Functions Introduced:
The functions listed in this section have been superseded. PTC recommends using the ProCrvcollection* and ProSrfcollection* functions instead of these; documentation for these functions is provided for maintenance of existing applications.
Example 1: Interactive Curve Collection using Creo TOOLKIT
The sample code in the file UgGeomCurveLength.c located at <creo_toolkit_loadpoint>/protk_appls/pt_userguide/ptu_geometry demonstrates the interactive curves collection and computes the total curve length - consisting of addition of lengths of individual curves in resulting selection set. The collection filter function is set to allow only edge type of selections.
Example 2: Interactive Surface Collection using Creo TOOLKIT
The sample code in the file UgGeomSurfArea.c located at <creo_toolkit_loadpoint>/protk_appls/pt_userguide/ptu_geometry demonstrates the interactive surface collection and computes the total area - consisting of addition of areas of individual surfaces in resulting selection set. It also creates parameter of double type on the individual surfaces and assigns it with the value of the individual surface area.