繁华若梦~ 2023-03-02 12:00 采纳率: 100%
浏览 55
已结题

matlab如何关闭maxwell界面

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

报错:检查对函数 'Quit' 的调用中是否存在不正确的参数数据类型或缺少参数。我用用样的语句关闭word、excel都没问题啊,就很奇怪

  • 写回答

1条回答 默认 最新

  • Web Security Loop 2023-03-02 12:27
    关注

    你在使用 Quit() 时没有提供必要的参数。要关闭 Maxwell 界面,将 Quit() 的参数设置为 false。

    
    oDesktop.Quit(false);
    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 3月10日
  • 已采纳回答 3月2日
  • 创建了问题 3月2日

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口