#搭建abaqus GHI脚本开发环境的方法
1、PrototypeToolsetGui.py
头部文件
import label_Directory_plugin
改变 初始化函数__init__中
self.form = test_plugin.Test_plugin(self)
改变onCmdForm()函数中
reload(test_plugin)
self.form = test_plugin.Test_plugin(self)
将test_plugin和Test_plugin改变为自己脚本中的plugin文件
2、改变自己脚本的 注册 文件plugin.py
#改变初始函数
def __init__(self, owner):
self.cmd = AFXGuiCommand(mode=self, method='label_print',
objectName='func1', registerQuery=False)
#在getFirstDialog中增加 reload(label_DirectoryDB)
def getFirstDialog(self):
import label_DirectoryDB
reload(label_DirectoryDB)
return label_DirectoryDB.Label_DirectoryDB(self)
3、注释Register the plug-in下面部分的代码

qycache脚本文件:
以下代码来源于abaqus官方文档
prototypeMainWindow.py
"""
This script will create the prototype application main window.
"""
from abaqusGui import *
from sessionGui import *
from canvasGui import CanvasToolsetGui
from viewManipGui import ViewManipToolsetGui
from prototypeToolsetGui import PrototypeToolsetGui
###########################################################################
# Class definition
###########################################################################
class PrototypeMainWindow(AFXMainWindow):
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def __init__(self, app, windowTitle=''):
# Construct the GUI infrastructure.
#
AFXMainWindow.__init__(self, app, windowTitle)
# Register the "persistent" toolsets.
#
self.registerToolset(FileToolsetGui(), GUI_IN_MENUBAR|GUI_IN_TOOLBAR)
self.registerToolset(ModelToolsetGui(), GUI_IN_MENUBAR)
self.registerToolset(CanvasToolsetGui(), GUI_IN_MENUBAR)
self.registerToolset(ViewManipToolsetGui(), GUI_IN_MENUBAR|GUI_IN_TOOLBAR)
self.registerToolset(PrototypeToolsetGui(), GUI_IN_MENUBAR|GUI_IN_TOOLBOX)
self.registerHelpToolset(HelpToolsetGui(), GUI_IN_MENUBAR|GUI_IN_TOOLBAR)
# Register modules.
#
self.registerModule('Part', 'Part')
self.registerModule('Property', 'Property')
self.registerModule('Assembly', 'Assembly')
self.registerModule('Step', 'Step')
self.registerModule('Interaction', 'Interaction')
self
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删