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?
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)