How to define a user defined result (udr) using cross section properties with mechanical scripting

Erik Kostson
Member, Moderator, Employee Posts: 312
✭✭✭✭
Say we have a beam model, that uses a cross section, and we want to get the section data (A, Ixx,..), in order to use it say in a udr?
Tagged:
0
Best Answer
-
Below is one way of doing it:
model=ExtAPI.DataModel.Project.Model analysis = model.Analyses[0] csg=ExtAPI.DataModel.GetObjectsByType(Ansys.ACT.Automation.Mechanical.CrossSections)[0] cs1=csg.Children[0] ar=(cs1.PropertyByName("CrossSectionArea").StringValue).split(" ")[0] udr=analysis.Solution.AddUserDefinedResult() udr.Expression="(BEAM_AXIAL_FX)/"+str(ar)
0
This discussion has been closed.