# encoding: utf-8
# Release 18.1
SetScriptVersion(Version="18.1.463")
template1 = GetTemplate(
    TemplateName="Static Structural",
    Solver="ANSYS")
system1 = template1.CreateSystem()
geometry1 = system1.GetContainer(ComponentName="Geometry")
geometry1.SetFile(FilePath="C:/Users/azer.b/Desktop/PadEye/Padeye 3D 2.0.dwg")
modelComponent1 = system1.GetComponent(Name="Model")
modelComponent1.Refresh()
model1 = system1.GetContainer(ComponentName="Model")
model1.Edit()
model1.Exit()
model1.Edit()
model1.Exit()
system2 = template1.CreateSystem(
    Position="Right",
    RelativeTo=system1)
geometry2 = system2.GetContainer(ComponentName="Geometry")
geometry2.SetFile(FilePath="C:/Users/azer.b/Desktop/Hilde k/Клюз Ansys.dwg")
geometry2.Edit()
geometry2.Exit()
modelComponent2 = system2.GetComponent(Name="Model")
modelComponent2.Refresh()
model2 = system2.GetContainer(ComponentName="Model")
model2.Edit()
model2.Exit()
model2.Edit()
model1.Edit()
model1.Exit()
model2.Exit()
system3 = template1.CreateSystem(
    Position="Right",
    RelativeTo=system2)
geometry3 = system3.GetContainer(ComponentName="Geometry")
geometry3.SetFile(FilePath="C:/Users/azer.b/Desktop/Обух такелажный 3D.dwg")
modelComponent3 = system3.GetComponent(Name="Model")
modelComponent3.Refresh()
model3 = system3.GetContainer(ComponentName="Model")
model3.Edit()
model3.Exit()
system4 = template1.CreateSystem(
    Position="Right",
    RelativeTo=system3)
geometry3.UpdateCAD()
model3.Edit()
model3.Exit()
geometry3.Edit()
geometry3.Exit()
modelComponent3.Refresh()
model3.Edit()
model3.Exit()
system3.Delete()
geometry4 = system4.GetContainer(ComponentName="Geometry")
geometry4.SetFile(FilePath="C:/Users/azer.b/Desktop/Обух такелажный 3D.dwg")
geometry4.Edit()
geometry4.Exit()
modelComponent4 = system4.GetComponent(Name="Model")
modelComponent4.Refresh()
model4 = system4.GetContainer(ComponentName="Model")
model4.Edit()
favorites1 = EngData.LoadFavoriteItems()
engineeringData1 = system4.GetContainer(ComponentName="Engineering Data")
matl1 = engineeringData1.ImportMaterial(
    Name="Structural Steel",
    Source="General_Materials.xml")
EngData.EnableFilter(Enable=False)
EngData.EnableFilter()
EngData.EnableFilter(Enable=False)
matl1.Delete()
library1 = EngData.OpenLibrary(
    Name="General Materials",
    Source="General_Materials.xml")
library2 = EngData.OpenLibrary(
    Name="General Non-linear Materials",
    Source="General Materials Non-linear.xml")
library3 = EngData.OpenLibrary(
    Name="Explicit Materials",
    Source="Explicit_Materials.xml")
library4 = EngData.OpenLibrary(
    Name="Fluid Materials",
    Source="Fluid_Materials.xml")
library5 = EngData.OpenLibrary(
    Name="Hyperelastic Materials",
    Source="Hyperelastic_Materials.xml")
library6 = EngData.OpenLibrary(
    Name="Thermal Materials",
    Source="Thermal_Materials.xml")
EngData.EnableFilter()
EngData.EnableFilter(Enable=False)
EngData.EnableFilter()
EngData.EnableFilter(Enable=False)
material1 = engineeringData1.GetMaterial(Name="Structural Steel")
matlProp1 = material1.CreateProperty(
    Name="Coefficient of Thermal Expansion",
    Definition="Instantaneous",
    Behavior="Orthotropic",
    Qualifiers={"Definition": "Instantaneous", "Behavior": "Orthotropic"})
matlProp1.Delete(
    Definition="Instantaneous",
    Behavior="Orthotropic")
matlProp1.Delete(
    Definition="Secant",
    Behavior="Isotropic")
template2 = GetTemplate(TemplateName="Rigid Dynamics")
system5 = template2.CreateSystem(
    Position="Right",
    RelativeTo=system4)
geometry5 = system5.GetContainer(ComponentName="Geometry")
geometry5.SetFile(FilePath="C:/Users/azer.b/Desktop/Обух такелажный 3D.dwg")
geometry5.Edit()
geometry5.Exit()
modelComponent5 = system5.GetComponent(Name="Model")
modelComponent5.Refresh()
model5 = system5.GetContainer(ComponentName="Model")
model5.Edit()
model5.Exit()
system5.Delete()
matlProp2 = material1.GetProperty(Name="Elasticity")
matlProp2.SetData(
    Variables=["Young's Modulus"],
    Values=[["210000 [MPa]"]])
modelComponent4.Refresh()
model4.Edit()
model4.Exit()
system1.Delete()
system2.Delete()
model4.Edit()
model4.Exit()
geometry4.Edit()
geometry4.Exit()
geometry4.SetFile(FilePath="C:/Users/azer.b/Desktop/Обух такелажный 3D/Обух такелажный 3D.dwg")
geometry4.Edit()
geometry4.Exit()
modelComponent4.Refresh()
model4.Edit()
model4.Exit()
Save(Overwrite=True)
