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

feat/ Make Mapdl.input accepts strings #801

Closed
germa89 opened this issue Jan 5, 2022 · 2 comments · Fixed by #815
Closed

feat/ Make Mapdl.input accepts strings #801

germa89 opened this issue Jan 5, 2022 · 2 comments · Fixed by #815
Assignees

Comments

@germa89
Copy link
Collaborator

germa89 commented Jan 5, 2022

Current situation

Sometimes, it is interesting to input multiple strings of MAPDL commands.

A less experienced PyMAPDL user might feel tempted to use Mapdl.input after writing a file.

However, there is the Mapdl.run_multiline which is for that purpose but it is not very known.

Proposal

I would propose then, either:

  • Create Mapdl.input_strings
  • Make Mapdl.input accept cmd multiline strings (checking for example if there is \n in the string) and redirect it to Mapdl.run_multiline.

Given the complexity of Mapdl.input, I feel the first method is better.

@germa89 germa89 self-assigned this Jan 5, 2022
@akaszynski
Copy link
Collaborator

Agree with the first approach. Should we simply rename run_multiline to input_strings?

@germa89
Copy link
Collaborator Author

germa89 commented Jan 7, 2022

mmhh... Although run_multiline is not used much in current implementation and docs, I would probably create input_strings (which maps to run_multiline) and show a deprecation warning in run_multiline for couple of releases.

It should not be a big deal to change the name though. But the above I think it is the recommended good practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants