Skip to content

Commit

Permalink
Merge pull request OpenMDAO#535 from hschilling/I533-3d-model-units
Browse files Browse the repository at this point in the history
Use get_val for getting values from case recorder for all places in dashboard code
  • Loading branch information
jkirk5 authored Sep 16, 2024
2 parents 13cad4f + 8250ecf commit de38fbe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aviary/visualization/aircraft_3d_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,15 @@ def get_variable_from_case(self, var_prom_name, units=None):
Value of the variable.
"""
try:
val = self._final_case[var_prom_name]
val = self._final_case.get_val(var_prom_name, units=units)
return float(val)
except KeyError as e:
pass

abs2prom = self._problem_metadata["abs2prom"]
for abs_name, prom_name in abs2prom["input"].items():
if prom_name == var_prom_name:
# the phrase "_OVERRIDE" in a variable indicates it is a calculated value that we are discarding
if prom_name == var_prom_name and '_OVERRIDE' not in abs_name:
val = self._final_case.get_val(abs_name, units=units)
return float(val)

Expand Down

0 comments on commit de38fbe

Please sign in to comment.