Skip to content

Commit

Permalink
upgrade api version and add version check on omniverse
Browse files Browse the repository at this point in the history
  • Loading branch information
mariostieriansys committed Mar 13, 2024
1 parent 6096362 commit e20ee9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [

dependencies = [
"importlib-metadata>=4.0; python_version<='3.8'",
"ansys-api-pyensight==0.3.6",
"ansys-api-pyensight==0.3.7",
"requests>=2.28.2",
"docker>=6.1.0",
"urllib3<2",
Expand Down
5 changes: 5 additions & 0 deletions src/ansys/pyensight/core/utils/omniverse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import subprocess
import sys
from types import ModuleType
from typing import TYPE_CHECKING, Optional, Union

import psutil
Expand Down Expand Up @@ -121,6 +122,8 @@ def create_connection(
the connection between EnSight and Omniverse.
"""
if not isinstance(self._ensight, ModuleType):
self._ensight._session.ensight_version_check("2023 R2")
self._check_modules()
if self._is_running_omniverse():
raise RuntimeError("An Omniverse server connection is already active.")
Expand Down Expand Up @@ -191,6 +194,8 @@ def update(self) -> None:
Push the current EnSight scene to the current Omniverse connection.
"""
if not isinstance(self._ensight, ModuleType):
self._ensight._session.ensight_version_check("2023 R2")
self._check_modules()
if not self._is_running_omniverse():
raise RuntimeError("No Omniverse server connection is currently active.")
Expand Down

0 comments on commit e20ee9d

Please sign in to comment.