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

haiiliin / abqpy / 8433139069

26 Mar 2024 08:44AM UTC coverage: 73.951% (+0.1%) from 73.831%
8433139069

push

github

haiiliin
pre-commit update

40 of 67 new or added lines in 57 files covered. (59.7%)

5 existing lines in 5 files now uncovered.

24153 of 32661 relevant lines covered (73.95%)

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

UNCOV
9
from typing import Sequence
×
10

11
from ..UtilityAndView.abaqusConstants import ALL, SymbolicConstant
×
12
from .FXIcon import FXIcon
×
13
from .PluginToolsetBase import PluginToolsetBase
×
14

15

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

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

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

77
        Parameters
78
        ----------
79
        toolboxName : str
80
            A String specifying the name of the toolbox in which the button will be shown. The name appears in the toolbox
81
            title bar.
82
        moduleName : str
83
            A String specifying the name of the module to be imported. The module must contain the function to be executed.
84
        functionName : str
85
            A String specifying the name of the function to be executed. The function must be located in _moduleName_.
86
        buttonText : str, optional
87
            A String specifying the text to be displayed in the Plug-ins menu. The default value is the empty string.
88
        icon : str, optional
89
            A FXIcon object specifying an icon to be displayed to the left of the text in the menu. For more information,
90
            see afxCreateIcon in the “Auxiliary functions” section of this guide. The default value is None.
91
        applicableModules : str, optional
92
            The SymbolicConstant ALL or a sequence of one or more Strings specifying the list of modules to which this
93
            plug-in applies. If a plug-in is not applicable to a module, it will be hidden when the user switches into that
94
            module. Possible values of the Strings in the sequence are “Part”, “Property”, “Assembly”, “Step”,
95
            “Interaction”, “Load”, “Mesh”, “Job”, “Visualization”, and “Sketch”. The default value is ALL.
96
        version : str, optional
97
            A String specifying the version of the plug-in. The version is displayed in the About Plug-ins dialog box.
98
            The default value is “N/A”.
99
        author : str, optional
100
            A String specifying the author of the plug-in. The author is displayed in the About Plug-ins dialog box. The
101
            default value is “N/A”.
102
        description : str, optional
103
            A String specifying the description of the plug-in. The description is displayed in the About Plug-ins dialog
104
            box. The default value is “N/A”.
105
        helpUrl : str, optional
106
            A String specifying the universal resource locator (URL) that points to the help for this plug-in. This URL can
107
            be loaded in a web browser from the View button in the About Plug-ins dialog box. The default value is “N/A”.
108
        """
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