def init():
    # Abaqus 'Plugins' toolset
    toolset = getAFXApp().getAFXMainWindow().getPluginToolset()
    # Attach 'ImpactTest' plugin to the toolset
    toolset.registerKernelMenuButton(
        buttonText='ImpactTest',
        # Plugin's main module
        moduleName="ImpactTestGUI",
        # Module's function to be invoked
        functionName="run()",
        author='Szymon Durak',
        description='Ballistic impact model designer',
        version='0.2',
        helpUrl=
        'https://github.com/superdurszlak/ImpactTest/blob/master/README.md')
示例#2
0
def init():
    # Abaqus 'Plugins' toolset
    toolset = getAFXApp().getAFXMainWindow().getPluginToolset()
    # Attach 'SubroutineTest' plugin to the toolset
    toolset.registerKernelMenuButton(
        buttonText='Subroutine Test',
        # Plugin's main module
        moduleName='plugin_runner',
        # Module's function to be invoked
        functionName='run()',
        author='Szymon Durak',
        description='User-defined constitutive models testing tool',
        version=VERSION,
        helpUrl=
        'https://github.com/superdurszlak/SubroutineTest/blob/master/README.md'
    )
示例#3
0
 def issue_match(self):
     # Check if the name already exists
     name = self.getCurrentDialog().get_current_name()
     if mdb.customData.matchers.has_key(name):
         # The name already exists: display an error message
         abaqusGui.showAFXErrorDialog(
             abaqusGui.getAFXApp().getAFXMainWindow(),
             'A constraint with this name already exists')
         # Return false indicating the command was not issued
         return False
     else:
         # The name does not exist yet: issue the command
         cmd = abaqusGui.AFXGuiCommand(
             mode=self,
             method='match_nodes',
             objectName='PeriodicBoundaryCondition_kernel',
             registerQuery=False)
         abaqusGui.AFXStringKeyword(cmd, 'name', True, name)
         abaqusGui.AFXIntKeyword(cmd, 'model', True,
                                 self.getCurrentDialog().currentModel,
                                 False)
         abaqusGui.AFXIntKeyword(cmd, 'part', True,
                                 self.getCurrentDialog().currentPart, False)
         abaqusGui.AFXIntKeyword(cmd, 'master', True,
                                 self.getCurrentDialog().currentMaster,
                                 False)
         abaqusGui.AFXIntKeyword(cmd, 'slave', True,
                                 self.getCurrentDialog().currentSlave,
                                 False)
         abaqusGui.AFXIntKeyword(
             cmd, 'ex_m', True,
             self.getCurrentDialog().get_master_exempt_index())
         abaqusGui.AFXIntKeyword(
             cmd, 'ex_s', True,
             self.getCurrentDialog().get_slave_exempt_index())
         abaqusGui.AFXIntKeyword(cmd, 'plane', True,
                                 self.getCurrentDialog().currentPlane,
                                 False)
         abaqusGui.AFXIntKeyword(cmd, 'sym', True,
                                 self.getCurrentDialog().currentSym, False)
         issue_command(cmd)
         # Return True indicating the command was issued
         return True
from abaqusGui import getAFXApp, Activator, AFXMode
from abaqusConstants import ALL
import os
thisPath = os.path.abspath(__file__)
thisDir = os.path.dirname(thisPath)

toolset = getAFXApp().getAFXMainWindow().getPluginToolset()
toolset.registerGuiMenuButton(buttonText='EU4 Exporter 2.0',
                              object=Activator(
                                  os.path.join(thisDir, 'exportToEU4_2DB.py')),
                              kernelInitString='import executeExporter_2',
                              messageId=AFXMode.ID_ACTIVATE,
                              icon=None,
                              applicableModules=ALL,
                              version='N/A',
                              author='N/A',
                              description='N/A',
                              helpUrl='N/A')
from abaqusGui import getAFXApp, Activator, AFXMode
from abaqusConstants import ALL
import os
thisPath = os.path.abspath(__file__)
thisDir = os.path.dirname(thisPath)

toolset = getAFXApp().getAFXMainWindow().getPluginToolset()
toolset.registerGuiMenuButton(
    buttonText='TrackPreprocess', 
    object=Activator(os.path.join(thisDir, 'myrailroadDB.py')),
    kernelInitString='import trackStifVar',
    messageId=AFXMode.ID_ACTIVATE,
    icon=None,
    applicableModules=ALL,
    version='1.0.1',
    author='Celestin Nkundineza,PhD',
    description= 'Affiliation: The University of Nebraska- Lincoln. \n\n'\
	'This GUI helps you quickly do the preprocessing of railroad track '\
	'parameterized by  spatial variations of track stiffness as well as loads.\n\n'\
	'Also, you can choose to use a simple rail geometry or an exact rail geometry.'\
	'Other flexibilities include your choice to use static loads or dynamic loads.\n\n'\
	'This plug-in will generate multiple inp files with respect to statistical data inputs of crosstie moduli.\n'\
	'It will also generate files that contain crosstie moduli per each track.'\
    'Note: version 1.0.1 adds periodic boundary conditions on the crosstie sides at the ends of the track \n\n'\
	"This plug-in's files may be copied from " +thisDir+ "\n"\
	'For any other question please contact the author at [email protected]',
    helpUrl='N/A'
)
示例#6
0
"""Provide tools to export results with meshio."""
import meshioGui as gui
from abaqusGui import AFXForm, getAFXApp

# Get toolset from Abaqus GUI application. The new plugins must be registered
# to this toolset in order to load at Abaqus startup
mainWindow = getAFXApp().getAFXMainWindow()
toolset = mainWindow.getPluginToolset()

# For each Plugin there is a new class derivated from AFXForm. Each constructor
# must call the base class constructor in order to pass the owner. Furthermore
# each class has a overridden function getFirstDialog, which defines the Dialog
# to start from this plugin. All these dialogs are implemented in
# fibermapGui.py


class CreateSymmTensor(AFXForm):
    """Form to build a new Tensor from existing state variables."""
    def __init__(self, owner):
        """Pass the toolset for initialization."""
        AFXForm.__init__(self, owner)

    def getFirstDialog(self):
        """Fire up the first dialog."""
        return gui.CreateSymmTensor(self)


class CreateVector(AFXForm):
    """Form to build a new Vector from existing state variables."""
    def __init__(self, owner):
        """Pass the toolset for initialization."""
示例#7
0
def debug_message(msg):
    abaqusGui.getAFXApp().getAFXMainWindow().writeToMessageArea(msg)
示例#8
0
    # Method override
    def onResume(self):
        # Call super method
        abaqusGui.AFXDialogStep.onResume(self)

    # Method override
    def onSuspend(self):
        # Call super method
        abaqusGui.AFXDialogStep.onSuspend(self)


# Code for the registration of the plug-in
thisPath = os.path.abspath(__file__)
thisDir = os.path.dirname(thisPath)
toolset = abaqusGui.getAFXApp().getAFXMainWindow().getPluginToolset()
toolset.registerGuiMenuButton(
    buttonText='Periodic Boundary Condition',
    object=Plugin(toolset),
    messageId=abaqusGui.AFXMode.ID_ACTIVATE,
    icon=None,
    kernelInitString='import PeriodicBoundaryCondition_kernel',
    applicableModules=abaqusConstants.ALL,
    version='1.1',
    author='Xavier van Heule',
    description=
    'A plugin to easily create periodic boundary conditions on 3D geometry',
    helpUrl=
    'https://github.com/smrg-uob/PeriodicBoundaryCondition/blob/master/README.md'
)