simulation_path = 'D:\project\Vibration_table\仿真曲线数据';
imaxwell = actxserver('Ansoft.ElectronicsDesktop');
oDesktop = imaxwell.GetAppDesktop();
oDesktop.RestoreWindow
oDesktop.OpenProject('D:/project/Vibration_table/Sim_vibration_table_new.aedt')
oProject = oDesktop.SetActiveProject('Sim_vibration_table_new');
oDesign = oProject.SetActiveDesign('vibration table_original');
oModule = oDesign.GetModule('BoundarySetup');
oModule.EditCurrent('Current1', {'NAME:Current1', 'Current:=', '64000A', 'IsSolid:=', ...
false, 'Point out of terminal:=', false})
oModule.EditCurrent('Current2', {'NAME:Current2', 'Current:=', '64000A', 'IsSolid:=', ...
false, 'Point out of terminal:=', false})
oModule.EditCurrent('Current3', {'NAME:Current3', 'Current:=', '400A', 'IsSolid:=', ...
false, 'Point out of terminal:=', false})
oEditor = oDesign.SetActiveEditor('3D Modeler');
picture_path = strcat(simulation_path,'\p1.bmp');
oEditor.ExportModelImageToFile(picture_path, 1247, 622, {'NAME:SaveImageParams', 'ShowAxis:=', ...
'False', 'ShowGrid:=', 'True', 'ShowRuler:=', 'True', 'ShowRegion:=', 'Default', 'Selections:=', ...
'', 'FieldPlotSelections:=', '', 'FitToSelections:=', '', 'FitToFieldPlotSelections:=', ...
'', 'Orientation:=', ''})
oProject.Save
imaxwell.Quit()
imaxwell.delete()
imaxwell.Quit()这句始终报错,错误信息为:检查对函数 'Quit' 的调用中是否存在不正确的参数数据类型或缺少参数。可是我用同样的语法关闭word、excel这些就没问题啊,实在搞不明白。