AutoEM refactoring

check history

杨治国整理版

作者: n5321

invoke(Editor,'ChangeProperty',{'NAME:ALLTabs',{'NAME:Machine',...

    {'NAME:PropServers','Machine'}, {'NAME:ChangedProps', ...

    {'NAME:Frictional Loss','Value:=',friction_loss}}}});

 

oDesign.ChangeProperty Array("NAME:AllTabs", Array("NAME:General", Array("NAME:PropServers"_

  "AnalysisSetup:Setup1"), Array("NAME:ChangedProps", Array("NAME:Rated Voltage", "Value:="_

  "225V"))))

 

oDesign.Analyze "Setup1"

Set oModule = oDesign.GetModule("AnalysisSetup")

oModule.CustomizedDesignSheet Array("NAME:Export Data", "SolutionKey:=", Array("SimSetup:="_

  52, "Instance:=", "DA=" & Chr(39) & "0.31mm" & Chr(39) & " DM=" & Chr(39) & "0.31mm" & Chr(39) & " length=" & Chr(39) & "27mm" & Chr(39) & " t=" & Chr(39) & "45cel" & Chr(39) & "", "Solution:="_

  53, "VersionID:=", 242168), "File Name:=", "D:/experiment/006.xls")

 

 

二次测试matlab里面不能导出excel表,是接口没有开吗?但是run script这个好像又开了。

 

所以还是值得去试一下?

实测可用,用matlab调用VBS函数,然后再来运行在ansoft中,针对excel表导出的问题。

 

Desktop.RunScript('D:/004.vbs')

模型还是必须要先调整好才能搞这个东西。

 

自己对于这个matlab中字符的处理还是不够熟悉。

目标整个流程,输入数据,计算等等都用matlab来操作。

 

问题。模型没写,字符串的处理没搞。对于matlab的编函数功能不够熟悉。

 

 

本周进展

1.       看了很多书以后重新来做这个script,虽然总体的框架类似,但是在思路上还是很不一样了。代码的质量应该还是提高了很多。

2.       杨给的maxwellVBS2matlab的功能确实还是很好用了。

3.       自己开始用function的思路来编script了。

4.       所以应该是在architect上还是简省了很多。没有那么复杂冗余了,当然计算机本身的运算好像还是差不多的。

5.       问题:SN用的class typedouble的,可以改custom,但是不知道怎么改。如果改成int应该可以计算得快一点吧。

6.       问题:自己把原来那个一致的ansoft model丢了,确实还是照成了很多不必要的麻烦。目前是一个subgoal&goal的思路,subgoal在调试模型上其实是有相当的技术难度,然后在获取客户信任上应该也有显著的意义。带进来的模型还是优化过的。也不知道自己原来的模型放哪里去了。哪一个是真的对的上的。烦。后天出去,还是把原来的script都整理一下。

7.       SN的几个子函数还是要再看一下。

 

 

 

RunScript = int32 RunScript(handle, string)

       PauseScript = void PauseScript(handle, string)

 

invoke(Desktop)

       GetActiveProject = handle GetActiveProject(handle)

       SetActiveProject = handle SetActiveProject(handle, string)

       OpenProject = handle OpenProject(handle, string)

       GetProjectList = Variant GetProjectList(handle)

       NewProject = handle NewProject(handle)

       CloseProject = void CloseProject(handle, string)

       RunScript = int32 RunScript(handle, string)

       PauseScript = void PauseScript(handle, string)

       Sleep = void Sleep(handle, int32)

       OpenMultipleProjects = handle OpenMultipleProjects(handle, string, string)

       Print = void Print(handle)

       PageSetup = void PageSetup(handle)

       RunProgram = int32 RunProgram(handle, string, string, string, Variant)

       QuitApplication = void QuitApplication(handle)

       RestoreWindow = void RestoreWindow(handle)

       GetVersion = string GetVersion(handle)

       EnableAutoSave = void EnableAutoSave(handle, int32)

       CloseAllWindows = void CloseAllWindows(handle)

       DeleteProject = void DeleteProject(handle, string)

       GetSysLibDirectory = string GetSysLibDirectory(handle)

       GetUserLibDirectory = string GetUserLibDirectory(handle)

       GetPersonalLibDirectory = string GetPersonalLibDirectory(handle)

       GetProjectDirectory = string GetProjectDirectory(handle)

       PauseRecording = void PauseRecording(handle)

       ResumeRecording = void ResumeRecording(handle)

       SetProjectDirectory = void SetProjectDirectory(handle, string)

       GetLibraryDirectory = string GetLibraryDirectory(handle)

       SetLibraryDirectory = void SetLibraryDirectory(handle, string)

       GetTempDirectory = string GetTempDirectory(handle)

       SetTempDirectory = void SetTempDirectory(handle, string)

       GetProjects = handle GetProjects(handle)

       SetActiveProjectByPath = handle SetActiveProjectByPath(handle, string)

       RunScriptWithArguments = int32 RunScriptWithArguments(handle, string, string)

       GetAutoSaveEnabled = int32 GetAutoSaveEnabled(handle)

       CloseProjectNoForce = void CloseProjectNoForce(handle, string)

       GetDistributedAnalysisMachines = handle GetDistributedAnalysisMachines(handle)

       GetMessages = Variant GetMessages(handle, string, string, int32)

       GetDistributedAnalysisMachinesForDesignType = handle GetDistributedAnalysisMachinesForDesignType(handle, string)

       GetBuildDateTimeString = string GetBuildDateTimeString(handle)

       ExportOptionsFiles = void ExportOptionsFiles(handle, string)

       RestoreProjectArchive = void RestoreProjectArchive(handle, string, string, int32, int32)

 

 

80070202