• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haiiliin / abqpy / 6433593370

06 Oct 2023 03:30PM UTC coverage: 73.825% (-9.3%) from 83.134%
6433593370

push

github

web-flow
[feature] Add GUI Toolkit Commands (backport #5260) (#5285)

[feature] Add GUI Toolkit Commands (#5260)

* Markdown

* Delete

* Add AFXApp and AFXBoolKeyword

* Delete

* Update headings

* Create parse.py

* Update parse.py

* Unicode Spaces

* Update .pre-commit-config.yaml

* Update md types

* Update Kernel plug-in registration commands.md

* Generated python stubs

* Add class inheritance

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Revert "Update .pre-commit-config.yaml"

This reverts commit 9d3aef3cc.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix mypy errors

* Delete parse.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix return types and imports

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update AFXColumnItems.md

* Update abaqusGui.py

* Add class/global flags

* Delete flags.py

* Fix flags

* Fix

* Skip mypy

* Update abaqusGui.py

* Update constants.py

* Create kernelAccess.py

* Add plugin docs

* Revert changes by docformatter

* Delete markdown files

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit a65ff5df8)

Co-authored-by: Hailin Wang <hailin.wang@connect.polyu.hk>

3661 of 3661 new or added lines in 151 files covered. (100.0%)

24137 of 32695 relevant lines covered (73.82%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/abaqus/PlugInRegistration/KernelPlugInCommands.py
1
"""Kernel plug-in commands register kernel plug-ins in either the **Plug-ins** menu or in a toolbox.
2

3
These functions can be accessed by::
4

5
    from abaqusGui import getAFXApp
6
    toolset=getAFXApp().getAFXMainWindow().getPluginToolset()
7
"""
8
from typing import Sequence
×
9

10
from ..UtilityAndView.abaqusConstants import ALL, SymbolicConstant
×
11
from .FXIcon import FXIcon
×
12

13

14
def registerKernelMenuButton(
×
15
    moduleName: str,
16
    functionName: str,
17
    buttonText: str = "",
18
    icon: FXIcon | None = None,
19
    applicableModules: SymbolicConstant | Sequence[str] = ALL,
20
    version: str = "N/A",
21
    author: str = "N/A",
22
    description: str = "N/A",
23
    helpUrl: str = "N/A",
24
):
25
    """Registers a kernel plug-in in the Plug-ins menu.
26

27
    Parameters
28
    ----------
29
    moduleName : str
30
        A String specifying the name of the module to be imported. The module must contain the function to be executed.
31
    functionName : str
32
        A String specifying the name of the function to be executed. The function must be located in moduleName.
33
    buttonText : str, optional
34
        A String specifying the text to be displayed in the Plug-ins menu. Use a pipe ( | ) between words to specify
35
        submenus. The default value is the empty string.
36
    icon : str, optional
37
        A FXIcon object specifying an icon to be displayed to the left of the text in the menu. For more information,
38
        see afxCreateIcon in the “Auxiliary functions” section of this guide. The default value is None.
39
    applicableModules : str, optional
40
        The SymbolicConstant ALL or a sequence of one or more Strings specifying the list of modules to which this
41
        plug-in applies. If a plug-in is not applicable to a module, it will be hidden when the user switches into that
42
        module. Possible values of the Strings in the sequence are “Part”, “Property”, “Assembly”, “Step”,
43
        “Interaction”, “Load”, “Mesh”, “Job”, “Visualization”, and “Sketch”. The default value is ALL.
44
    version : str, optional
45
        A String specifying the version of the plug-in. The version is displayed in the About Plug-ins dialog box.
46
        The default value is “N/A”.
47
    author : str, optional
48
        A String specifying the author of the plug-in. The author is displayed in the About Plug-ins dialog box.
49
        The default value is “N/A”.
50
    description : str, optional
51
        A String specifying the description of the plug-in. The description is displayed in the About Plug-ins dialog
52
        box. The default value is “N/A”.
53
    helpUrl : str, optional
54
        A String specifying the universal resource locator (URL) that points to the help for this plug-in. This URL can
55
        be loaded in a web browser from the View button in the About Plug-ins dialog box. The default value is “N/A”.
56
    """
57

58

59
def registerKernelToolButton(
×
60
    toolboxName: str,
61
    moduleName: str,
62
    functionName: str,
63
    buttonText: str = "",
64
    icon: FXIcon | None = None,
65
    applicableModules: SymbolicConstant | Sequence[str] = ALL,
66
    version: str = "N/A",
67
    author: str = "N/A",
68
    description: str = "N/A",
69
    helpUrl: str = "N/A",
70
):
71
    """Registers a kernel plug-in in a toolbox.
72

73
    Parameters
74
    ----------
75
    toolboxName : str
76
        A String specifying the name of the toolbox in which the button will be shown. The name appears in the toolbox
77
        title bar.
78
    moduleName : str
79
        A String specifying the name of the module to be imported. The module must contain the function to be executed.
80
    functionName : str
81
        A String specifying the name of the function to be executed. The function must be located in _moduleName_.
82
    buttonText : str, optional
83
        A String specifying the text to be displayed in the Plug-ins menu. The default value is the empty string.
84
    icon : str, optional
85
        A FXIcon object specifying an icon to be displayed to the left of the text in the menu. For more information,
86
        see afxCreateIcon in the “Auxiliary functions” section of this guide. The default value is None.
87
    applicableModules : str, optional
88
        The SymbolicConstant ALL or a sequence of one or more Strings specifying the list of modules to which this
89
        plug-in applies. If a plug-in is not applicable to a module, it will be hidden when the user switches into that
90
        module. Possible values of the Strings in the sequence are “Part”, “Property”, “Assembly”, “Step”,
91
        “Interaction”, “Load”, “Mesh”, “Job”, “Visualization”, and “Sketch”. The default value is ALL.
92
    version : str, optional
93
        A String specifying the version of the plug-in. The version is displayed in the About Plug-ins dialog box.
94
        The default value is “N/A”.
95
    author : str, optional
96
        A String specifying the author of the plug-in. The author is displayed in the About Plug-ins dialog box. The
97
        default value is “N/A”.
98
    description : str, optional
99
        A String specifying the description of the plug-in. The description is displayed in the About Plug-ins dialog
100
        box. The default value is “N/A”.
101
    helpUrl : str, optional
102
        A String specifying the universal resource locator (URL) that points to the help for this plug-in. This URL can
103
        be loaded in a web browser from the View button in the About Plug-ins dialog box. The default value is “N/A”.
104
    """
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc