Skip to content

Commit 1b5ac00

Browse files
germa89akaszynski
andauthored
Fix/ missing empty arguments in int1 and maybe others - Convert module (#678)
* Adding list of commands to be skipped when converting. * Adding missing increment variable in `get_array`. * Update ansys/mapdl/core/convert.py Co-authored-by: Alex Kaszynski <[email protected]> Co-authored-by: Alex Kaszynski <[email protected]>
1 parent 32e0cc9 commit 1b5ac00

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

ansys/mapdl/core/convert.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
from ansys.mapdl.core.commands import Commands
66

77

8+
# Because the APDL version has empty arguments, whereas the PyMAPDL
9+
# doesn't have them. Hence the order of arguments is messed up.
10+
COMMANDS_TO_NOT_BE_CONVERTED = {
11+
'INT1'
12+
}
13+
814
def convert_script(
915
filename_in,
1016
filename_out,
@@ -163,6 +169,10 @@ def translate_line(self, line):
163169
if not line:
164170
return
165171

172+
if line[:4].upper() in COMMANDS_TO_NOT_BE_CONVERTED:
173+
self.store_run_command(line)
174+
return
175+
166176
if line[:4].upper() == "/TIT": # /TITLE
167177
parameters = line.split(",")[1:]
168178
return self.store_command("title", ["".join(parameters).strip()])

ansys/mapdl/core/mapdl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,6 +2386,7 @@ def get_array(
23862386
arr = self._get_array(entity, entnum, item1, it1num, item2, it2num, kloop)
23872387
if ntry > 5:
23882388
raise RuntimeError("Unable to get array for %s" % entity)
2389+
ntry += 1
23892390
return arr
23902391

23912392
def _get_array(

0 commit comments

Comments
 (0)