How to add a simple line chart in Mechanical under Static Structural? Its not available via GUI (RMB options). Only available for LS Dyna.
Since its currently not supported for Mechanical (Static Structural for example), please treat this solution as a Beta feature.
myAnalysis = DataModel.AnalysisList[0] sol = myAnalysis.Solution chart = sol.AddLineChart2D() import Ansys.Mechanical.DataModel.Utilities as a var1 = a.ChartVariable([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "m", "Length") var2 = a.ChartVariable([1010, 2011, 3012, 4013, 5014, 6015, 7016, 8017, 9018, 10019, 11020]) ds1 = a.Dataset2D("Straight Line", var1, var2) chart.Update([ds1]) Model.DisableFilter() Model.AutoFilter()
This will create a simple line chart with the data provided as shown below.