Say we want to copy paste a load from one analysis to another analysis using mechanical scripting?
The below script can copy from one to another (inside mech. script console - Systems A and B are linked). mmid = ExtAPI.DataModel.AnalysisList[1] mobj = ExtAPI.DataModel.GetObjectsByName('Displacement')[0]
def mypaste(id,obj): JScmds = 'DS.Tree.PasteItems({},{})'.format(id,obj) ExtAPI.Application.ScriptByName("jscript").ExecuteCommand(JScmds) print('hello') mypaste(mmid.ObjectId,mobj.ObjectId) Tree.Refresh()