• 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/AFXCommand.py
1
from __future__ import annotations
×
2

3
from .AFXMode import AFXMode
×
4
from .FXObject import FXObject
×
5

6

7
class AFXCommand(FXObject):
×
8
    """This class is the abstract base class for command classes that are processed by modes."""
9

10
    def __init__(self, mode: AFXMode, method: str, objectName: str = "''", registerQuery: bool = False):
×
11
        """Constructor.
12

13
        Parameters
14
        ----------
15
        mode : AFXMode
16
            Host mode.
17
        method : str
18
            Method.
19
        objectName : str
20
            Object name.
21
        registerQuery : bool
22
            True if a query should be registered when the command is used for the GUI.
23
        """
24

25
    def activate(self):
×
26
        """Activates the command; active commands will be processed during command generation."""
27

28
    def deactivate(self):
×
29
        """Deactivates the command; inactive commands will not be processed during command generation."""
30

31
    def getCommandString(self):
×
32
        """Returns the command string based on the current values of the active keywords."""
33

34
    def getExpandedObjectName(self):
×
35
        """Returns the expanded object name that has all the "%s"'s replaced by the current names."""
36

37
    def getKeyword(self, index: int):
×
38
        """Returns the keyword at the given index (returns 0 if the index is out-of-bounds).
39

40
        Parameters
41
        ----------
42
        index : int
43
            Keyword index (0-based).
44
        """
45

46
    def getMethod(self):
×
47
        """Returns the command's method."""
48

49
    def getNumKeywords(self):
×
50
        """Returns the number of keywords."""
51

52
    def getObjectName(self):
×
53
        """Returns the object name (which is not expanded and may include "%s"'s)."""
54

55
    def isActive(self):
×
56
        """Returns True if the command is active."""
57

58
    def isQueryNeeded(self):
×
59
        """Returns True if the command needs to register a query for kernel state."""
60

61
    def isRequired(self):
×
62
        """Returns True if this command is going to be sent even if none of its keywords has been modified,
63
        otherwise returns False."""
64

65
    def setKeywordValuesToDefaults(self, ignoreUnspecified: bool = False):
×
66
        """Sets the values of all keywords to their defaults.
67

68
        Parameters
69
        ----------
70
        ignoreUnspecified : bool
71
            Ignore setting the value if the default is unspecified.
72
        """
73

74
    def setKeywordValuesToPrevious(self):
×
75
        """Sets the values of all keywords to their previous values."""
76

77
    def setMethod(self, method: str):
×
78
        """Sets the command's method.
79

80
        Parameters
81
        ----------
82
        method : str
83
            Method.
84
        """
85

86
    def setObjectName(self, objectName: str):
×
87
        """Sets the object name.
88

89
        Parameters
90
        ----------
91
        objectName : str
92
            Object name.
93
        """
94

95
    def setRequired(self, val: bool):
×
96
        """Sets this command as required or optional; if True the command will always be sent, if False the
97
        command will be sent only if it has modified keywords or if it has no keywords.
98

99
        Parameters
100
        ----------
101
        val : bool
102
        """
103

104
    def syncKeywordPreviousValues(self):
×
105
        """Synchronizes the current values and previous values of all keywords."""
106

107
    def verify(self):
×
108
        """Throws an exception if any of the keywords contain invalid data."""
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