mapdl.get() gives an empty string if we have mapdl.nopr() issued before mapdl.get()
See original GitHub issueThe below mapdl.get() command should get the number of result sets in the rst file. In the below command deck, Anzset_python is correctly printed (float).
mapdl.post1()
mapdl.file(fname="Simple_Cantilever",ext="rst")
mapdl.set(1, 1)
#mapdl.nopr()
Anzset_python = mapdl.get(par="Anzset_mapdl", entity="ACTIVE", entnum="", item1="set", it1num="nset")
print('Number of sets: Python Variable -->', Anzset_python)
Number of sets: Python Variable --> 1.0
However, when I activate the mapdl.nopr() command, Anzet_python gives an empty string. Is this a bug?
mapdl.post1()
mapdl.file(fname="Simple_Cantilever",ext="rst")
mapdl.set(1, 1)
mapdl.nopr()
Anzset_python = mapdl.get(par="Anzset_mapdl", entity="ACTIVE", entnum="", item1="set", it1num="nset")
print('Number of sets: Python Variable -->', Anzset_python)
Number of sets: Python Variable -->
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
ANSYS Mechanical APDL Command Reference - BME-MM
If you are unable to access the Legal Notice, please contact ANSYS, Inc. Published in the ... as shown in this example:*GET command...
Read more >Manipulating Text Strings in ANSYS Mechanical APDL - PADT
Before we talk about manipulating strings, we should do some background on strings. Strings can either be stored as a character parameter or...
Read more >Using *TREAD in Ansys Mechanical APDL to Read External ...
Engineers using TREAD command in Ansys or the *VREAD command to get data into Ansys Mechanical APDL, sometimes get stuck in the process....
Read more >Implement the APDL *GET shortcuts in PyMAPDL #504 - GitHub
Implement pymapdl versions of APDL *GET shortcuts. See the APDL *GET documentation to see the exact values N can take in the examples...
Read more >sheldon's ansys.net-Undocumented Features
Undocumented commands & features are not guaranteed or supported by ANSYS ... The answer is to get the msgpop status before you change...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The Query methods are unlikely to be deprecated in the near future as they perform several valuable, but we’re going to fix the documentation to use
mapdl.queries
instead offrom ansys.mapdl.core import Query
.Agree in regards to using
get_value
rather thanget
. @jgd10, can you refactor this?The legacy method get relies on printing an output and then parsing the text and will likely be deprecated (or moved) as we work to expose more features using modern, direct methods. The get_value method does this as it directly requests the data from the server, thus avoiding writing any intermediate text.
In the meantime, I’d do the following:
get_value
rather thanget
unless you need to store the parameter within MAPDL and grab it at the same time./NOPR
a unsupported when issued frommapdl.nopr
andrun()
(really, just capture the request atrun
). We can allow it to be run from_run
just in case we need to issue it temporarily, but I think that you’re right, there overlap already withmute
.