Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs to improve mapdl.get() functionality #116

Open
2 tasks done
vnamdeo opened this issue Jul 6, 2023 · 0 comments
Open
2 tasks done

Needs to improve mapdl.get() functionality #116

vnamdeo opened this issue Jul 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@vnamdeo
Copy link
Contributor

vnamdeo commented Jul 6, 2023

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 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.
download1
download2

📝 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
@vnamdeo vnamdeo added the bug Something isn't working label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants