diff --git a/doc/changelog.d/4147.miscellaneous.md b/doc/changelog.d/4147.miscellaneous.md new file mode 100644 index 00000000000..d26ed526c1f --- /dev/null +++ b/doc/changelog.d/4147.miscellaneous.md @@ -0,0 +1 @@ +Fix: migrated (PR 4146): Set _post as a property so it's initialized when needed \ No newline at end of file diff --git a/src/ansys/mapdl/core/mapdl_core.py b/src/ansys/mapdl/core/mapdl_core.py index 79cb99234dc..a119ae3e5b3 100644 --- a/src/ansys/mapdl/core/mapdl_core.py +++ b/src/ansys/mapdl/core/mapdl_core.py @@ -375,7 +375,8 @@ def __init__( if log_apdl: self.open_apdl_log(log_apdl, mode="w") - self._post = PostProcessing(self) + # Empty object that will store the `PostProcessing` object + self._post_object = None # Wrapping listing functions for "to_array" methods self._wrap_listing_functions() @@ -963,7 +964,11 @@ def post_processing(self) -> "PostProcessing": raise MapdlRuntimeError( "MAPDL exited.\n\nCan only postprocess a live " "MAPDL instance." ) - return self._post + + if self._post_object is None: + self._post_object = PostProcessing(self) + + return self._post_object @property def print_com(self):