# encoding: utf-8
# 2019 R3
SetScriptVersion(Version="19.5.112")
template1 = GetTemplate(
    TemplateName="Static Structural",
    Solver="ANSYS")
system1 = template1.CreateSystem()
geometry1 = system1.GetContainer(ComponentName="Geometry")
geometry1.Edit(IsSpaceClaimGeometry=True)
geometry1.Exit()
geometry1.Edit(IsSpaceClaimGeometry=True)
geometry1.Exit()
geometry1.Edit()
geometry1.Exit()
system1.Delete()
system2 = template1.CreateSystem()
geometry2 = system2.GetContainer(ComponentName="Geometry")
geometry2.Edit(IsSpaceClaimGeometry=True)
geometry2.Exit()
geometry2.Edit()
modelComponent1 = system2.GetComponent(Name="Model")
modelComponent1.Refresh()
model1 = system2.GetContainer(ComponentName="Model")
model1.Edit()
engineeringData1 = system2.GetContainer(ComponentName="Engineering Data")
material1 = engineeringData1.GetMaterial(Name="Structural Steel")
matlProp1 = material1.GetProperty(Name="Elasticity")
matlProp1.SetData(
    Variables=["Young's Modulus"],
    Values=[["2100000000 [Pa]"]])
Save(Overwrite=True)
system3 = template1.CreateSystem(
    Position="Right",
    RelativeTo=system2)
geometry2.Exit()
model1.Exit()
geometry3 = system3.GetContainer(ComponentName="Geometry")
geometry3.Edit()
modelComponent2 = system3.GetComponent(Name="Model")
modelComponent2.Refresh()
model2 = system3.GetContainer(ComponentName="Model")
model2.Edit()
geometry3.Exit()
model2.Exit()
Save(Overwrite=True)
