Reference Topics > Recursive selective instancing
  
Recursive selective instancing
You can also create "recursive" selective instances within nested subassemblies. This involves creating a chain of selective instances of subassemblies ending with either another subassembly or a part. The recursion is necessary because components belong to the contents of their owning assembly, and in a shared structure the contents are unique; therefore a chain of selective instances is required to define the unique splitting of an end component.
You can define the "path" of a recursive chain of selective instances by selecting the successive subassembly contexts to split from the shared assembly structure. (Note that this chain needs to be defined from the top down within the assembly structure.) Alternatively, you can define the chain automatically by specifying an end component and the assembly from which it is to be split (that is, the context); Creo Elements/Direct Modeling will create the necessary chain of selective instances between them.
Using the piston example above, you can change the color of the two piston rings for one of the pistons but not the other by selectively unsharing the rings with respect to the cylinder. You can do this by manually specifying which piston is to be split into a selective instance, and then by splitting the rings from that piston. You can also simply specify the rings and the top assembly context (the cylinder) and allow Creo Elements/Direct Modeling to create the necessary chain. The figure shows the modified rings.
Selective instances of the rings within the assembly
Note that there is a "first" assembly level within a shared assembly structure which must be selectively unshared if a component below this level is to be selectively unshared. For example, the rings in the example above could not be a selective instance with respect to the piston alone; a selective instance must also be made of the piston with respect to the cylinder. This is because there is only one instance of the shared piston (before it is split), and therefore only one instance of the rings below it; there must be a chain of selective instances from the cylinder to the rings. When you create selective instances, Creo Elements/Direct Modeling automatically selects this "first" assembly level as the default context.
Selective instances of read-only assemblies
All information about a selective instance is stored in the instance of the shared assembly in which it was defined. In this way, you can create selective instances of components of read-only assemblies: The selective instance information is included with the instance that is created when working with the (read-only) contents data.
The intention of selective instancing
Selective instancing is intended to be used in shared assembly structures where the assembly components need to be arranged differently amongst the shares. In most cases, the assemblies will already have been completed, so that the structure of their components as well as the components themselves are not expected to be modified further. However, when there are movable parts within an assembly, different shares of the assembly can still be considered the same (for example, in a bill of materials) if the components are in different positions depending on the assembly context in which they are built.
Selective instancing can also be useful on occasions without assembly sharing: Components of read-only assemblies can be adapted to a specific context without requiring a change to the assembly contents.