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

mapdl working directory should be python working directory. #1163

Closed
germa89 opened this issue Jun 2, 2022 · 4 comments
Closed

mapdl working directory should be python working directory. #1163

germa89 opened this issue Jun 2, 2022 · 4 comments
Assignees
Milestone

Comments

@germa89
Copy link
Collaborator

germa89 commented Jun 2, 2022

Description of the feature

mapdl working directory should be python working directory.

Hence this should be possible:

If our python cwd is: C:\python_cwd, and we want to input something in C:\python_cwd\files\file.cdb, then you should be able to do:

mapdl.input('files\file.cdb')

Steps for implementing the feature

We need to modify mapdl.input.

Useful links and references

No response

@germa89 germa89 added this to the v0.62.1 milestone Jun 2, 2022
@germa89 germa89 self-assigned this Jun 2, 2022
@emhen
Copy link

emhen commented Aug 30, 2022

Along the lines of path definition, it would be helpful that if a path is defined by:
ansys = launch_mapdl(run_location=args.path)
that pymapdl recognizes this is the location that any log files, outputs like results of cdwrite, etc. belong.

@germa89
Copy link
Collaborator Author

germa89 commented Mar 23, 2023

Along the lines of path definition, it would be helpful that if a path is defined by:
ansys = launch_mapdl(run_location=args.path)
that pymapdl recognizes this is the location that any log files, outputs like results of cdwrite, etc. belong.

Having all the temporal files in the python directory can be a mess. I rather make PyMAPDL clever enough to look for in the right location.

@germa89
Copy link
Collaborator Author

germa89 commented Mar 23, 2023

Closing this because it was implemented in #783

@germa89
Copy link
Collaborator Author

germa89 commented Mar 23, 2023

This now works:

from ansys.mapdl.core import launch_mapdl
mapdl=launch_mapdl()

out = mapdl.input("input.inp")

print(out)

Where the input.inp file is in the working directory.

@germa89 germa89 closed this as completed Mar 23, 2023
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

No branches or pull requests

2 participants