冷雪 发表于 2017-8-29 16:20

Electric Machines Design Toolkit

*Global - Messages
UnboundLocalException: Local variable 'All_Dirs' referenced before assignment.In file "C:/Users/wang/Documents/Ansoft/PersonalLib/Toolkits/Maxwell2D/Electric Machines Design Toolkit - R16/Electric Machines Design Toolkit.py", line 8625 ---- While executing script: C:/Users/wang/Documents/Ansoft/PersonalLib/Toolkits/Maxwell2D/Electric Machines Design Toolkit - R16/Electric Machines Design Toolkit.py
为什么错了?

hman 发表于 2017-8-29 17:27

找不到文件路径,要修改Electric Machines Design Toolkit.py文件中的三个语句中的.mxwl为.aedt即可。即把:
      dir_LSDSO_path = os.path.join(self.proj_Path, self.oProject.GetName()+ ".mxwlresults" )
      dir_LSDSO_path = os.path.join(self.proj_Path, self.oProject.GetName()+ ".mxwlresults" )
      dir_Proj_des_path = os.path.join(self.ProjectPath, self.oProject.GetName()+ ".mxwlresults")
改为:
      dir_LSDSO_path = os.path.join(self.proj_Path, self.oProject.GetName()+ ".aedtresults" )
      dir_LSDSO_path = os.path.join(self.proj_Path, self.oProject.GetName()+ ".aedtresults" )
      dir_Proj_des_path = os.path.join(self.ProjectPath, self.oProject.GetName()+ ".aedtresults")

冷雪 发表于 2017-8-29 21:28

感谢您的回复,的确是这个原因

冷雪 发表于 2017-8-29 22:20

新的问题出来了,什么原因?
*Global - Messages
Run is called: (22:15:44, August 29, 2017)
Design contains conflicting local variables! You may be intending to Run from original design or use Update. Run requires that the names of local variables in the design be different from the following:'Speed_TSC', 'Imax_TSC', 'Gamma_TSC'
Toolkit has completed tasks successfully. Now you can use the Maxwell UI: (22:16:28, August 29, 2017)

冷雪 发表于 2017-8-29 22:43

有一个新问题


MissingMemberException: 'MainToolkit' object has no attribute 'ProjectPath'In file "C:/Program Files/AnsysEM/AnsysEM17.0/Win64/syslib/Toolkits/Maxwell2D/Electric Machines Design Toolkit - R16.1/Electric Machines Design Toolkit.py", line 923 ---- While executing script: C:/Program Files/AnsysEM/AnsysEM17.0/Win64/syslib/Toolkits/Maxwell2D/Electric Machines Design Toolkit - R16.1/Electric Machines Design Toolkit.py

sam643 发表于 2019-8-20 22:52

感謝分享~~感謝分享~~
页: [1]
查看完整版本: Electric Machines Design Toolkit