You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PyMAPDL, to store the parameter value, we use direct python assignment as shown below.
strss_tens = mapdl.get("STS_TENS", "SECR", 1, "S", "X", "MAX")
Hence, the value return by *Get command is stored to the variable. So, if the command echo's value along with String, it will also be stored to the variable. Due to this reason, above variable ("strss_tens") type is string instead of floating/integer.
The current GET class implementation in PyMAPDL, is simply a mirror image of MAPDL *get command functionality. Using below workaround we can still store the floating value to the variable.
strss_tens = float(mapdl.get("STS_TENS", "SECR", 1, "S", "X", "MAX")[:11]
However, it will be nice, if PyMAPDL Get function handle it internally and return floating value to the variable.
📝 Steps to reproduce
Described as above.
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
Ansys v2023R2
🐍 Which Python version are you using?
3.8
📦 Installed packages
pip install ansys-mapdl-core
The text was updated successfully, but these errors were encountered:
🔍 Before submitting the issue
🐞 Description of the bug
In PyMAPDL, to store the parameter value, we use direct python assignment as shown below.
strss_tens = mapdl.get("STS_TENS", "SECR", 1, "S", "X", "MAX")
Hence, the value return by *Get command is stored to the variable. So, if the command echo's value along with String, it will also be stored to the variable. Due to this reason, above variable ("strss_tens") type is string instead of floating/integer.
The current GET class implementation in PyMAPDL, is simply a mirror image of MAPDL *get command functionality. Using below workaround we can still store the floating value to the variable.
strss_tens = float(mapdl.get("STS_TENS", "SECR", 1, "S", "X", "MAX")[:11]
However, it will be nice, if PyMAPDL Get function handle it internally and return floating value to the variable.
📝 Steps to reproduce
Described as above.
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
Ansys v2023R2
🐍 Which Python version are you using?
3.8
📦 Installed packages
The text was updated successfully, but these errors were encountered: