Example: Replacing Items
This example illustrates the way replacing an item works. It is the same example as in Example: Replacing References, but this time, the IdleCon component is completely replaced, not just the references to it.
Before the Become Another Item command is executed, the ControllerTest project (and some other projects) references the IdleCon component. Another project Project references the IdleCon_new component.

The Become Another Item command is used to replace the IdleCon component with IdleCon_new. After the command has been executed, the IdleCon component is deleted from the Component Manager. The "Database" list now contains the components IdleCon_new and IdleCon_new_copy.

From the element view, it can be seen that ControllerTest now references IdleCon_new under the old name. IdleCon_new has the identifier from the replaced component IdleCon.

Show References reveals that all projects that originally referenced IdleCon now reference IdleCon_new.

The IdleCon_new_copy component contains the original instance of the replacing component and accordingly is referenced by the project Project.


See also