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.