Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/4161.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: Added scalar_param method to MapdlInProcess class
7 changes: 0 additions & 7 deletions src/ansys/mapdl/core/mapdl_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,3 @@ def name(self):
if not self._name:
self._name = f"Console_PID_{self._process.pid}"
return self._name

def scalar_param(self, parm_name):
response = self.starstatus(parm_name)
response = response.splitlines()[-1]
if parm_name.upper() not in response:
raise ValueError(f"Parameter {parm_name} not found")
return float(response.split()[1].strip())
8 changes: 8 additions & 0 deletions src/ansys/mapdl/core/mapdl_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,14 @@ def parameters(self) -> "Parameters":
"""
return self._parameters

def scalar_param(self, parm_name):
response = self.starstatus(parm_name)
response = response.splitlines()[-1]

if parm_name.upper() not in response:
raise ValueError(f"Parameter {parm_name} not found")
return float(response.split()[1].strip())

@property
def platform(self):
"""Return the platform where MAPDL is running."""
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
description = Default tox environments list
envlist =
style,{py38,py39,py310,py311,py312,py313}{,-coverage},doc
style,{py39,py310,py311,py312,py313}{,-coverage},doc
skip_missing_interpreters = true
isolated_build = true
isolated_build_env = build
Expand Down
Loading