How to create and fill a spline object in Motion?

Gabriel Messager
Member, Employee Posts: 59
✭✭✭✭
in 3D Design
Answers
-
analysis = Model.Analyses[0] newspline = analysis.CreateLoadObject("Spline","ANSYSMotion") table = newspline.Properties.GetByName("Spline") newspline.Caption = "SPL_Stiffness" newspline.Controller.DisposeFigure(newspline) X = [-1e-3, 0, 0.1, 1e3] Y = [-100, 0, 2000, 2500] X_Data = table.Properties.GetByName("XData") Y_Data = table.Properties.GetByName("YData") for i in range (0,len(X)): table.AddRow() X_Data.Value = X[i] Y_Data.Value = Y[i] table.SaveActiveRow() table.ValidState=ValidStateEnum.StateValid newspline.NotifyChange()
0