Assembly: Top-down Design
This section describes the Creo TOOLKIT Design Manager functions. For more information on Design Intent, Top-Down Design, and other Design Manager issues, refer to the Assembly portion of the Creo Parametric help data, or the Top-Down Design Task Guide.
Overview
Creo Parametric supports a design concept called Top-Down Design. Top-Down Design is a method of designing a product by specifying top-level design criteria and passing those criteria down from the top level of the product’s structure to all affected subsystems. The Creo TOOLKIT Design Manager functions support this design concept. The next sections contain a brief summary of the six steps of Top-Down Design.
Defining Design Intent
Before building parts and assemblies, it is important that you define the intent of your design. Doing this means defining:
•  Purpose or function of the product
•  Major systems and subsystems required
•  Incorporation of subsystems into the overall product
•  Dependence (if any) on any existing design or product
Design criteria and parameters you specify in this process can be shared globally among all components of the assembly, and can be used to drive design parts, assemblies, and skeleton models.
Defining Preliminary Product Structure
The preliminary product structure consists of a list of components and their hierarchy within the assembly design. This structure allows creation of subassemblies and parts without requiring creation of geometry and without having to assemble parts. You can add existing subassemblies and parts to this structure. You can also define non-geometric information for the entire design and capture design parameters including description, part number, and part type. Creo TOOLKIT Design Manager manages the assembly structure with assembly component functions.
Introducing Skeleton Models
Skeleton models are a 3-dimensional layout of the assembly. These models are holders or distributors of critical design information, and can represent space requirements, important mounting locations, and motion.
Skeleton models can contain the master definition of the design information, which can be propagated to specific design models. You can also use skeleton models to communicate design information between components. Creo TOOLKIT Design Manager uses skeleton model functions to manipulate these models.
Communicating Design Intent Throughout the Assembly Structure
Designers can distribute top-level design information to dependent skeleton models in the assembly. Design modification becomes a matter of changing certain distributed properties. This propagation of information first occurs from skeleton to skeleton, and then from skeleton to part until all necessary part- or subassembly-specific references have been distributed. Designers can then work on a small subsystem without retrieving or regenerating the entire top-level assembly.
This distribution lets designers reference the same information instead of recreating it for each subassembly. Creo TOOLKIT Design Manager handles the assembly structure with functions for assembly components, features, and copy geometry features.
Continued Population of the Assembly
Populate the assembly with detailed parts and subassemblies in one of two ways:
•  Create new components in the context of the assembly
•  Model components individually and then bring them into the assembly
Relate individual parts to each other with assembly relations, skeleton models, layouts, and merge features. Creo TOOLKIT Design Manager functions manage the assembly structure with functions for assembly components, features, and copy geometry features.
Managing Part Interdependencies
Associativity allows you to modify design intent to cause automatic updating of the appropriate objects in your assembly. Associativity is accomplished through external relationships, also known as dependencies or references.
Part interdependencies allow for communication of design criteria from components on one level of the design to components on lower levels. Associativity and part dependencies provide a means for controlled changing or updating of an entire assembly design. Reference control manages part interdependencies by limiting undesirable ones or allowing desirable ones.
External references are dependencies between a Creo Parametric object (part or subassembly) and information from another object not owned by either the referencing object or its submodels. References to “out-of-model” information are external references. Design Manager handles these references with external reference control functions.
Scope is the range of objects to which a specified object can refer. Scope control functions allow you to define objects to which other objects under development can refer. You can establish global scope settings for all objects or specific settings for individual objects.
Design Manager handles scope issues with external reference control functions. The enumerated type ProExtRefScope defines possible scope settings as:
•  None—Allows no external references.
•  Subassembly—Allows external references only to components of the same subassembly
•  Skeleton Model—Allows external references to higher-level skeleton models only
•  All—Allows external references to any other object anywhere in the assembly
The enumerated type ProInvalidRefBehavior defines two methods of handling out-of-scope references. They are as follows:
•  Prohibit Out-of-Scope references—Creo TOOLKIT reports the external reference as out of scope. You must select another reference.
•  Copy Out-of-Scope Reference—Creo TOOLKIT warns that the reference is out of scope. You must do one of the following:
  Cancel the selection and choose a different reference
  Confirm that you do want to use the selected reference. Creo TOOLKIT then creates a “local backup” of the reference. The local backup reference automatically updates (only while the parent is in the current session).
Skeleton Model Functions
Functions Introduced:
Create skeleton models using function ProAsmSkeletonMdlnameCreate(). This function creates a new skeleton model with the specified name, adds it to the specified assembly, and initializes the model handle. The input arguments are assembly handle, the skeleton model name, and the handle to the part or skeleton used as a template. If the template handle is NULL, an empty skeleton model is created.
By default, the absolute accuracy template is used to create a new model. After you create a new model using the initial value of absolute accuracy, the baseline of the outline is used to determine whether the absolute accuracy is still valid. The outline of the model is calculated after the creation of the first feature of the model or placing the first component in an assembly model. Refer to the Creo Parametric help for more information on Model Accuracy.
ProAsmSkeletonAdd() adds an existing skeleton model to the specified assembly. The input arguments are a handle for the assembly to which the skeleton model will be added, and a handle to the skeleton model.
ProAsmSkeletonGet() returns a skeleton model of the specified assembly that is currently in memory, then initializes the model handle. The input argument is a handle to the specified assembly.
ProAsmSkeletonDelete() deletes a skeleton model component from the specified assembly. The input argument is a handle to the specified assembly.
ProMdlIsSkeleton() determines if the specified model is a skeleton model. The input argument is a handle to the model to be checked.
Assembly Component Functions
Functions Introduced:
Create new components in the specified assembly by copying them from a specified model using ProAsmcompMdlnameCreateCopy(). This function creates a new component with the specified name, places it at a default location in the assembly, or leaves it unplaced. The input arguments are the assembly to copy from, the new component name, the new component type (either PRO_MDL_ASSEMBLY or PRO_MODEL_PART), the handle to the model used as a template, and specification of default or “unplaced” component placement. If the template handle is NULL, the component is created empty.
ProAsmCompIsUnplaced() determines whether the specified component is unplaced. The input argument is a handle to the component to be checked.
ProAsmCompFillFromMdl() copies the specified template model into a model of the specified component. The input arguments are the handle to the component, and the handle to the model used as a template for the copy.
External Reference Control Functions
Functions Introduced:
Function ProRefCtrlSolidSet() sets a specified external reference control setting on a solid, that is, on a part or assembly. Use ProRefCtrlSolidGet() to retrieve the external reference control setting for a specified solid.
ProRefCtrlEnvirSet() establishes the run-time environment setting for external reference control. Function ProRefCtrlEnvirGet() retrieves this data.
Function ProRefCtrlCheckScope() checks whether object-specific reference control settings for a specified model (either an independent object or an assembly component) allow that model to reference information belonging to a different model. The top-level assembly for the component being modified and for the component being referenced must be the same.
If ProRefCtrlCheckScope() finds that the owner of the component being modified is NULL and the solid (part or assembly) being referenced is not a sub-model of the solid being modified, it reports the reference as out of assembly context. If the ProMdl returned is NULL but there is a scope violation, the environment scope has been violated.
The enumerated type ProExtRefScope defines allowed scope settings for external references as follows:
typedef enum{
  PRO_REFCTRL_ALLOW_ALL           = 0, /* all external references allowed*/
  PRO_REFCTRL_ALLOW_SUBASSEMBLY   = 1, /* allow only external references
                                          inside the same higher level
                                          subassembly as that
                                          of the modified object         */
  PRO_REFCTRL_ALLOW_SKELETON      = 2, /* only external references to
                                          skeleton models allowed        */
  PRO_REFCTRL_ALLOW_NONE          = 3  /* no external references allowed */
} ProExtRefScope;
Enumerated type ProInvalidRefBehavior defines the supported methods for handling Out-of-Scope external references as follows:
typedef enum
{  PRO_REFCTRL_BACKUP_REF       = 0,   /* create a local backup for
                                         out-of-scope references         */
  PRO_REFCTRL_PROHIBIT_REF      = 1    /* prohibit out-of-scope external
                                         references                      */
} ProInvalidRefBehavior;
Feature and CopyGeom Feature Functions
Functions Introduced:
The function ProFeatureCopiedRefStateDetailsGet() retrieves the status of copied references for a specified feature. This function supports both CopyGeom features and features with local backup of references.
Note
CopyGeom features have no local backup of reference data.
The enumerated type ProCopiedRefStateDetails defines possible states of local copies of external references in a CopyGeom feature or in a feature with a local backup.
ProFeatureHasBackup() determines if the specified feature has local backup of external references.
Use the function ProFeatureDSFDependencystateSet() with dependency status PRO_DSF_UPDATE_AUTOMATICALLY Use the function ProFeatureDSFDependencystateSet() with dependency status PRO_DSF_UPDATE_MANUALLY
The function ProFeatureDSFDependencystateSet() sets the dependency status of data sharing feature(DSF). The dependency status governs the behavior of the data sharing feature if the items referenced by the feature have changed. The valid values for the dependency status are:
•  PRO_DSF_UPDATE_AUTOMATICALLY—Specifies that all the changes made to the parent model are automatically reflected in the DSF feature.
•  PRO_DSF_UPDATE_MANUALLY—Specifies that the feature must be updated manually to keep it up-to-date with the referenced model.
•  PRO_DSF_NO_DEPENDENCY—Specifies that there will be no dependency between the DSF feature and referenced model. This includes updating the geometry of the DSF, automatic retrieval of the referenced model and checking in the model to Windchill.
For more information on the dependency statuses, refer to the section Feature Element Tree in Assembly: Data Sharing Features.
The function ProFeatureDSFDependencystateGet() gets the current dependency status for the DSF feature.
Use the function ProFeatureDSFDependencyNotifySet() to set the notification status, to visually indicate the changes applied to the source geometry of the data sharing feature.
Use the function ProFeatureDSFDependencyNotifyGet() to get a visual indication of the current notification status of the DSF feature. If the notification status is set to on, then any change made in the source geometry is indicated in the form of a yellow triangle in the model tree of the DSF feature in the Creo Parametric user interface. Also, a general notification icon appears, adjacent to the regeneration icon on the status bar in the Creo Parametric user interface. This icon indicates the change in the source geometry of the DSF feature.
Note
Use the functions ProFeatureDSFDependencyNotifySet() and ProFeatureDSFDependencyNotifyGet() only if the dependency status of the DSF feature is set to PRO_DSF_UPDATE_MANUALLY.
External Reference Data Gathering
An external reference or an external dependency is a relationship between an object, such as, a part or subassembly and some information from another object that is not inherently available to the referencing object all the time. While investigating object dependencies in an assembly, some features may exist that were created in the context of another assembly. All such dependencies are called external dependencies and they point to a component in another assembly. See the Creo Parametric help for more information on external references.
Functions Introduced:
The function ProFeatureExternChildrenGet() retrieves information about external and local children of the specified feature according to the specified reference type. The function ProFeatureExternParentsGet() does the same for parents of the feature.
The function ProSolidExternChildrenGet() retrieves external and local children of the specified solid according to the specified reference type. The function ProSolidExternParentsGet() does the same for parents of the solid.
The function ProExtRefInfoFree() releases memory allocated to the external reference data for a feature or solid.
The function ProExtRefStateGet() returns the external reference status of the referenced item of the specified reference.
The enumerated type ProRefState defines the possible states of top-level solids, such as, part, assembly or component, to which a lower-level solid refers.
The function ProExtRefTypeGet() returns the type of the external reference.
The enumerated type ProExtRefType defines the supported external reference types as follows:
typedef enum
{
  PRO_EXT_GEOM_REF    = 1,       /* all out of solid references,
                                  created in assembly context, kept in
                                  plins, sections, draft sections        */
  PRO_LOC_GEOM_REF    = 2,       /* local for solid references, kept in
                                  plins, sections, draft sections        */
  PRO_MERGE_REF       = 3,       /* reference models of merge by ref feats  */
  PRO_EXT_REL_REF     = 4,       /* out of solid references, , kept in
                                  symbols used for relations.
                                  Can be "to solid" or feature,
                                  geometry references.                   */
  PRO_LOC_REL_REF     = 5,       /* local for solid references, kept in
                                  symbols used for relations.
                                   Can be "to solid" or feature, 
                                   geometry references.                   */
  PRO_PRGM_REF        = 6,       /* out of solid references, , kept in
                                  symbols used in Pro/Program.
                                  Always solid references                */
  PRO_MOVE_COMP_REF   = 7,       /* Move Components external references.
                                 Kept in components and always "to solid".
									 This reference is not present in models 
									 created after Creo Elements/Pro 5.0    */
  PRO_SUBS_REF        = 8,       /* Substitute Component references.
                                Kept in components and always "to solid"*/
  PRO_MFG_INFO_REF    = 9,       /* Mfg Info references.  Kept in
                                mfg feat, always "to solid"             */
  PRO_INTRCH_REF      = 10,      /* Interchange Assembly references.
                             Kept in the solid itself.
                             Always "to solid"                      */
  PRO_HARN_REF        = 11,      /* Harness references.
                               Kept in the solid itself.
                              Always "to solid"                      */
  PRO_FEAT_PAT_REF    = 12,      /* Feature pattern references.
                                Does not include pattern relation
                              references.  Always "to solid"          */
  PRO_NON_ASSY_GEOM_REF = 13,    /* Out of solid external geometry refs,
                               created not in assembly context,
                              kept in plins. (used in external geom
                               copy feature).                           */
  PRO_DIM_BOUND_REF     = 14,    /* Dim. bound references.
                                Kept in the solid itself.
                              Always "to solid"                        */
  PRO_HIDDEN_FEM_REFS   = 15,    /* Hidden Simulate features references.
                               Kept in the solid itself.
                               Always "to solid"                        */
  PRO_ANALYSIS_REF      = 16,    /* Hidden analysis features references.
                               Kept in the solid itself.
                               Always "to solid"                        */
  PRO_FEAT_PAT_LOC_REF  = 17,    /* References between pat. leader and member
                            or between pat. group headers          */
  PRO_DEPENDENCY_REFS   = 18,    /* All types of references collected via
                             collect dependencies mechanism. This type 
									is not included in COLL_ALL_REFS_TYPE, it 
									should be invoked separately.            */
  PRO_IN_CIRCLE_REFS    = 19,    /* References encountered in assembly loops. 
									This is reserved for future use			 */                                  
  PRO_MEMBER_REFS       = 20,    /* Component models of assembly members. 
									This type is not included in 
									COLL_ALL_REFS_TYPE, it should be invoked 
									separately.								 */
  PRO_LOC_MERGE_REF     = 21,    /* Merge reference of mirror geom. 
                                    Always "to solid"                     */
  PRO_ALL_EXT_REF_TYPES = 100,   /* Same as PRO_ALL_REF_TYPES except for 
									PRO_LOC_GEOM_REF, PRO_LOC_REL_REF, 
									PRO_LOC_MERGE_REF, PRO_FEAT_PAT_LOC_REF  */
  PRO_ALL_REF_TYPES     = 101    /* All known types of references, except for
									PRO_DEPENDENCY_REFS,PRO_IN_CIRCLE_REFS and
									PRO_MEMBER_REFS.			             */
} ProExtRefType;                 /* types of references */
The structures ProExtFeatRef and ProExtRefInfo provide pointers to a structure containing external references for a specified feature:
typedef struct ext_feat_ref *ProExtFeatRef;
typedef struct 
{
   ProExtRefType    type;   ProExtFeatRef   *ext_refs;
   int              n_refs;
} ProExtRefInfo;
The function ProExtRefAsmcompsGet() retrieves from the specified external reference a path to the component from which the reference was created. It also returns a path to the component that owns the specified external reference.
The function ProExtRefOwnMdlGet() retrieves a solid that is active in the session and uses the provided reference . The function ProExtRefMdlGet() retrieves a solid, in a model that is active in the session. This returned solid is referred to by the specified external reference.
The function ProExtRefOwnFeatGet() retrieves from the specified external reference a feature that uses the reference. The function ProExtRefFeatGet() retrieves from the specified external reference a feature referred to by the external reference.
The function ProExtRefModelitemGet() retrieves from the specified external reference a model item that uses that reference.
The function ProExtRefInfoExport() prints out a dependency report for all references of type PRO_DEPENDENCY_REFS in the specified format. The input arguments of this function are:
•  info_arr—Specify all the references of the type PRO_DEPENDENCY_REFS collected using the functions ProSolidExternParentsGet() and ProFeatureExternParentsGet(). All the references that are not dependencies will be ignored.
•  w_fname—Specify the name of the file to which the report is to be printed.
•  n_rep_type—Specify the type of report format. The valid values for this input argument are:
  PRO_REPORT_TYPE_CSV—Specifies a comma separated value file.
  PRO_REPORT_TYPE_XML—Specifies a XML file.
The function ProExtRefIsDependency() indicates if the specified reference is an external dependency.
The function ProExtRefDependencyIsBreakable() indicates if some of the specified dependencies can be broken or not, in case the corresponding external references are not required.
The function ProExtRefBreakDependency() breaks the external references from the specified array of references. Among all references in the specified array, this acts only on those external references that are breakable. As a result of break operation, the dependency associated with the external reference is broken, which prevents the formation of ghost objects in Product Development Management System. Refer the Creo Parametric Help for more information on breaking dependencies.