Skip to content

Commit a6c4918

Browse files
author
Valentin Allard
committed
fix: Moved scalar_param method to _MapdlCore class to access in MapdlInProcess
1 parent de1cf18 commit a6c4918

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/ansys/mapdl/core/mapdl_console.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,3 @@ def name(self):
355355
if not self._name:
356356
self._name = f"Console_PID_{self._process.pid}"
357357
return self._name
358-
359-
def scalar_param(self, parm_name):
360-
response = self.starstatus(parm_name)
361-
response = response.splitlines()[-1]
362-
if parm_name.upper() not in response:
363-
raise ValueError(f"Parameter {parm_name} not found")
364-
return float(response.split()[1].strip())

src/ansys/mapdl/core/mapdl_core.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,14 @@ def parameters(self) -> "Parameters":
939939
"""
940940
return self._parameters
941941

942+
def scalar_param(self, parm_name):
943+
response = self.starstatus(parm_name)
944+
response = response.splitlines()[-1]
945+
946+
if parm_name.upper() not in response:
947+
raise ValueError(f"Parameter {parm_name} not found")
948+
return float(response.split()[1].strip())
949+
942950
@property
943951
def platform(self):
944952
"""Return the platform where MAPDL is running."""

0 commit comments

Comments
 (0)