Production Applications: Process Planning
This section describes how to use the Creo TOOLKIT functions for assembly process operations. It assumes that you are familiar with the functionality of Manufacturing Process Planning for ASSEMBLIES.
Process Step Objects
Function Introduced:
Process steps are represented by the object ProProcstep, which is an instance of ProModelitem. The object ProProcstep describes the contents and ownership of a assembly process step.
The declaration is as follows:
   typedef struct pro_model_item
   {
     ProType    type;
     int        id;
     ProMdl     owner;
   } ProProcstep;
To create a new process step handle, use the function ProProcstepInit().
Visiting Process Steps
Function Introduced:
The function ProProcstepVisit() enables you to visit all the process steps in the specified solid. For a detailed explanation of visiting functions, see the section Visit Functions in the Fundamentals section.
Process Step Access
Functions Introduced:
These functions access the process step objects.
The functions ProProcstepActiveGet() and ProProcstepActiveSet() enable you to get and set the current active process step.
The function ProProcstepNumberGet() retrieves the process step number for the specified solid and process step.
Creating Process Steps
To create an assembly process step, use the function ProFeatureCreate(). As with any other type of feature, you use the element tree to create a process step feature.
This section describes the basic principles of programmatic process step creation. The section Element Trees: Principles of Feature Creation is a necessary background for this topic; therefore, you should read that section first.
The element tree for a process step feature is documented in the header file ProProcstep.h and has a fairly simple structure, as shown in the following figure. You can also create a copy of the feature element tree of an existing process step feature by calling the function ProFeatureElemtreeExtract() with an input feature of type ProProcstep.
The following figure shows the element tree of a process step feature.
Element Tree of Process Step Feature
Image
Feature Elements
The following table describes the tree elements in more detail.
Element ID
Data Type
Description
PRO_E_FEATURE_TYPE
PRO_VALUE_TYPE_INT
PRO_FEAT_PROCESS_STEP
PRO_E_PROCESS_STEP_TYPE
PRO_VALUE_TYPE_INT
PRO_E_COMPONENTS
PRO_VALUE_TYPE_SELECTION
Step components
PRO_E_DESCRIPTION
PRO_VALUE_TYPE_WSTRING
Step description
PRO_E_POSITION
PRO_VALUE_TYPE_TRANSFORM
Position transformation
PRO_E_GEN_STEP_TYPE
PRO_VALUE_TYPE_WSTRING
General step type
PRO_E_GEN_STEP_REFS
PRO_VALUE_TYPESELECTION_
General step references
PRO_E_SIMPLFD_REP
PRO_VALUE_TYPE_INT
Simplified representation identifier
PRO_E_EXPLODE_STATE
PRO_VALUE_TYPE_INT
Explode state identifier
PRO_E_TIME_ESTIMATE
PRO_VALUE_TYPE_DOUBLE
Time estimate (greater than 0.0)
PRO_E_COST_ESTIMATE
PRO_VALUE_TYPE_DOUBLE
Cost estimate (any value)
Types of Process Step
The types of process step are as follows:
•  PRO_PROCSTEP_ASSEMBLE—Step to assemble components
•  PRO_PROCSTEP_DISASSEMBLE—Step to disassemble components
•  PRO_PROCSTEP_REASSEMBLE—Step to reassemble components
•  PRO_PROCSTEP_REPOSITION—Step to reposition components
•  PRO_PROCSTEP_GENERAL—General step (default or user-defined types)
Optional Elements
The following elements in the tree are optional for all types of process step:
•  PRO_E_DESCRIPTION
•  PRO_E_SIMPLFD_REP
•  PRO_E_EXPLODE_STATE
•  PRO_E_TIME_ESTIMATE
•  PRO_E_COST_ESTIMATE
For a detailed explanation of explode states and related functions, see the section Exploded Assemblies in the Assembly: Basic Assembly Access section.
General Process Steps
The following two elements are used for general process steps (type PRO_PROCSTEP_GENERAL) only:
•  PRO_E_GEN_STEP_TYPE—Default types, as well as user-defined types
•  PRO_E_GEN_STEP_REFS—The following are valid reference types:
  PRO_PART
  PRO_FEATURE
  PRO_SURFACE
  PRO_EDGE
  PRO_CURVE
  PRO_AXIS
  PRO_CSYS
  PRO_POINT
Reposition Process Steps
The element PRO_E_POSITION is used for reposition process steps. It defines the transformation of the repositioned components.