M_G
Mechanical
- Jan 14, 2019
- 2
I am working on xml+python script development, ACT. Here is a problem need help.
I am doing development in AIM. when I assign a material to a body, the scrip record is like this:
>>>materialAssignment2 = study1.CreateEntity(
>>> Type="MaterialAssignment",
>>>Association=physicsDefinition1,
>>> Location=[[highlight #FCE94F]"BODY8"[/highlight]])
>>>material1 = study1.CreateEntity(
>>> Type="Material",
>>> Association=physicsDefinition1)
>>>material1.ImportEngineeringData(Name="Aluminum Alloy")
>>>materialAssignment2.Material = material1
the problem is i do not know "BODY8", but only know its part name "1.par"
HOW to get the "BODY8" of "1.par", through script? thank you very much!
I am doing development in AIM. when I assign a material to a body, the scrip record is like this:
>>>materialAssignment2 = study1.CreateEntity(
>>> Type="MaterialAssignment",
>>>Association=physicsDefinition1,
>>> Location=[[highlight #FCE94F]"BODY8"[/highlight]])
>>>material1 = study1.CreateEntity(
>>> Type="Material",
>>> Association=physicsDefinition1)
>>>material1.ImportEngineeringData(Name="Aluminum Alloy")
>>>materialAssignment2.Material = material1
the problem is i do not know "BODY8", but only know its part name "1.par"
HOW to get the "BODY8" of "1.par", through script? thank you very much!