Example: Using a Component ID in an Assembly Relation
If you create an assembly in which the same generic components is assembled twice, you can write the following relation to sum up the lengths of these two components:
Total_length = d3:2 + d3:2
where d3 is the dimension and 2 is the Session ID of the generic.
If you replace one of the generic components with an instance from its Family Table, this relation is no longer accurate. If the assembly contains one generic and one instance, you can change the relation to read as follows:
Total_length = d3:4 + d3:4
where d3 is the dimension and 4 is the Session ID of the instance that replaced the generic.
Creo Parametric cannot determine which of the two dimensions must be updated to reflect the Session ID of the instance. To address this situation, you can write assembly relations using internal Component IDs (cid) which are unique for every assembly component.
If you are using two identical generic components as in the first example, the relation changes as follows:
Total_length = d3:cid_1 + d3:cid_3
where:
• d3—the dimension
• cid_1—refers to the first generic component
• cid_3—refers to the other generic component.
If one of the generic components is replaced with one of its instances, the relation is properly updated to reflect this change and total_length properly calculates the sum of the lengths of the generic component and the instance component.