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

Use chain_commands in convert_script #3153

Closed
mikerife opened this issue Jun 4, 2024 · 1 comment · Fixed by #3154
Closed

Use chain_commands in convert_script #3153

mikerife opened this issue Jun 4, 2024 · 1 comment · Fixed by #3154
Assignees

Comments

@mikerife
Copy link

mikerife commented Jun 4, 2024

Description of the feature

In an MAPDL input file the following commands:
type,11 $real,11 $mat,11
Will be translated to the following by the PyMAPDL convert_script:

mapdl.type("11 $real", "11 $mat", 11)

Would it be possible to instead translate them to a chain_commands style like so?

with mapdl.chain_commands:
     mapdl.type(11)
     mapdl.real(11)
     mapdl.mat(11)



### Steps for implementing the feature

Do that Python scripting that you do....

### Useful links and references

_No response_
@germa89
Copy link
Collaborator

germa89 commented Jun 5, 2024

mmhh...

The easiest would be to just avoid converting that line if there is a $ symbol.

Wrapping it in a context manager requires more work I think

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