# encoding: utf-8
# 2020 R2
SetScriptVersion(Version="20.2.221")
system1 = GetSystem(Name="SYS 5")
model1 = system1.GetContainer(ComponentName="Model")
model1.Edit()
system2 = GetSystem(Name="SYS 3")
model2 = system2.GetContainer(ComponentName="Model")
model2.Edit()
system1.DisplayText = "new forces"
system1.Copy(KeepConnections=False)
system3 = GetSystem(Name="SYS 6")
system3.DisplayText = "new forces 3D"
geometryComponent1 = system3.GetComponent(Name="Geometry")
geometryComponent2 = system1.GetComponent(Name="Geometry")
geometryComponent1.ReplaceWithShare(
    TargetSystem=system3,
    ComponentToShare=geometryComponent2,
    SourceSystem=system1)
engineeringDataComponent1 = system3.GetComponent(Name="Engineering Data")
engineeringDataComponent2 = system1.GetComponent(Name="Engineering Data")
engineeringDataComponent1.ReplaceWithShare(
    TargetSystem=system3,
    ComponentToShare=engineeringDataComponent2,
    SourceSystem=system1)
modelComponent1 = system3.GetComponent(Name="Model")
modelComponent1.Refresh()
model1.Exit()
model2.Exit()
Save(Overwrite=True)
