Skip to content

PyMechanical Embedded session does not work well with Ansys Motion Extension #1159

@vishnuramn

Description

@vishnuramn

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

Image

Please refer the image . I am able to do this in remote instance not in embedded instance .
This seems like a clear bug.

also this works well with mechanical batch .

The intermittent fix was provided by Mohamed Koubaa :

import ansys.mechanical.core as mech

assembly_path = r"C:\...\v251\aisol\WBAddins\MechanicalExtensions\ANSYSMotion\dll"
vm_path = r"C:\...\v251\Motion\bin"

import sys
sys.path.append(assembly_path)
sys.path.append(vm_path)

app = mech.App(version=251)

import clr
print(clr.AddReference("ANSYSMotion"))

import ANSYSMotionHelper

but still the issue comes in different place
I have created an motion object after executing the above workaround script and get the below
Image

📝 Steps to reproduce

from ansys.mechanical.core import App
app = App()
app.update_globals(globals())
print(app)
import ANSYSMotionHelper

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

25 R1

🐍 Which Python version are you using?

3.10

📦 Installed packages

(vvenv) C:\Users\vvenkata\vishnu_venv\vvenv\Scripts>python -m pip freeze
absl-py==2.1.0
aiohttp==3.9.5
aiosignal==1.3.1
annotated-types==0.7.0
ansys-api-dbu==0.3.18
ansys-api-geometry==0.4.57
ansys-api-mapdl==0.5.2
ansys-api-mechanical==0.1.2
ansys-api-platform-instancemanagement==1.0.0
ansys-api-pyensight==0.4.7
ansys-dpf-core==0.13.6
ansys-dpf-post==0.9.2
ansys-dynamicreporting-core==0.10.1
ansys-geometry-core==0.10.5
ansys-mapdl-core==0.69.3
ansys-mapdl-reader==0.54.2
ansys-math-core==0.2.2
ansys-mechanical-core==0.11.14
ansys-mechanical-env==0.1.9
ansys-mechanical-stubs==0.1.6
ansys-openapi-common==2.2.2
ansys-optislang-core==0.10.0
ansys-platform-instancemanagement==1.1.2
ansys-pyensight-core==0.9.11
ansys-pythonnet==3.1.0rc6
ansys-simai-core==0.2.6
ansys-tools-path==0.4.1
ansys-tools-visualization-interface==0.2.6
anyio==4.6.0
appdirs==1.4.4
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asgiref==3.7.2
asttokens==2.4.1
astunparse==1.6.3
async-lru==2.0.4
async-timeout==4.0.3
attrs==23.2.0
babel==2.16.0
bcrypt==4.2.0
beartype==0.17.2
beautifulsoup4==4.12.3
bleach==6.1.0
blinker==1.7.0
build==1.0.3
cachetools==5.3.2
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
cloudpickle==3.0.0
clr-loader==0.2.6
colorama==0.4.6
comm==0.2.1
contourpy==1.2.0
cryptography==42.0.3
cycler==0.12.1
dash==3.0.3
dash-bootstrap-components==1.6.0
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-table==5.0.0
dash_daq==0.5.0
dask==2024.9.1
dataclasses-json==0.6.7
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
Deprecated==1.2.14
Django==4.2.20
django-guardian==2.4.0
djangorestframework==3.16.0
docker==7.1.0
docutils==0.21.2
et_xmlfile==2.0.0
exceptiongroup==1.2.0
executing==2.0.1
fastjsonschema==2.20.0
filelock==3.13.1
Flask==3.0.2
flatbuffers==25.2.10
FMPy==0.3.21
fonttools==4.49.0
fqdn==1.5.1
frozenlist==1.4.1
fsspec==2024.9.0
gast==0.6.0
geomdl==5.3.1
google-api-core==2.17.1
google-api-python-client==2.118.0
google-auth==2.28.0
google-auth-httplib2==0.2.0
google-pasta==0.2.0
googleapis-common-protos==1.62.0
grpcio==1.65.4
grpcio-health-checking==1.60.1
h11==0.14.0
h5py==3.11.0
httpcore==1.0.6
httplib2==0.22.0
httpx==0.27.2
idna==3.6
imageio==2.34.2
importlib-metadata==6.11.0
ipykernel==6.29.2
ipython==8.21.0
isoduration==20.11.0
itsdangerous==2.1.2
jaraco.classes==3.3.1
jedi==0.19.1
Jinja2==3.1.3
json5==0.9.25
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2023.12.1
jupyter-events==0.10.0
jupyter-lsp==2.2.5
jupyter_client==8.6.0
jupyter_core==5.7.1
jupyter_server==2.14.2
jupyter_server_terminals==0.5.3
jupyterlab==4.2.5
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.3
kaleido==0.2.1
keras==3.8.0
keyring==24.3.0
kiwisolver==1.4.5
lark==1.2.2
lazy_loader==0.4
libclang==18.1.1
locket==1.0.0
lxml==5.3.0
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==2.1.5
marshmallow==3.26.1
matplotlib==3.8.3
matplotlib-inline==0.1.6
mdurl==0.1.2
mistune==3.0.2
ml-dtypes==0.4.1
more-itertools==10.2.0
mpmath==1.3.0
msgpack==1.0.8
multidict==6.0.5
mypy-extensions==1.0.0
namex==0.0.8
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
networkx==3.3
nh3==0.2.15
notebook==7.2.2
notebook_shim==0.2.4
numpy==1.26.4
opencv-python==4.10.0.84
openpyxl==3.1.5
opt_einsum==3.4.0
optree==0.14.0
overrides==7.7.0
packaging==23.2
pandas==2.2.0
pandocfilters==1.5.1
paramiko==3.5.0
parso==0.8.3
partd==1.4.2
patsy==1.0.1
pillow==10.2.0
Pint==0.23
pkginfo==1.9.6
platformdirs==4.2.0
plotly==5.19.0
pooch==1.8.0
prometheus_client==0.21.0
prompt-toolkit==3.0.43
protobuf==4.25.7
psutil==7.0.0
psycopg==3.2.6
psycopg-binary==3.2.6
pure-eval==0.2.2
pyansys-tools-versioning==0.5.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycparser==2.21
pydantic==2.8.2
pydantic_core==2.20.1
pygltflib==1.16.3
Pygments==2.17.2
pyiges==0.3.1
PyNaCl==1.5.0
pyparsing==3.1.1
pypiwin32==223
pypng==0.20220715.0
pyproject_hooks==1.0.0
PyQt5==5.15.11
PyQt5-Qt5==5.15.2
PyQt5_sip==12.15.0
pyqtgraph==0.13.7
PyQtWebEngine==5.15.7
PyQtWebEngine-Qt5==5.15.2
pyspnego==0.10.2
python-dateutil==2.9.0.post0
python-json-logger==2.0.7
python-pptx==0.6.19
pytwin==0.8.0
pytz==2024.1
pyvista==0.43.3
pywin32==306
pywin32-ctypes==0.2.2
pywinpty==2.0.13
PyYAML==6.0.2
pyzmq==25.1.2
readme-renderer==42.0
referencing==0.35.1
requests==2.32.3
requests-negotiate-sspi==0.5.2
requests-ntlm==1.2.0
requests-toolbelt==1.0.0
retrying==1.3.4
rfc3339-validator==0.1.4
rfc3986==2.0.0
rfc3986-validator==0.1.1
rich==13.7.0
rpds-py==0.20.0
rsa==4.9
scikit-image==0.24.0
scipy==1.12.0
scooby==0.9.2
scp==0.15.0
semver==3.0.2
Send2Trash==1.8.3
six==1.16.0
sniffio==1.3.1
soupsieve==2.6
spyder-kernels==2.5.0
sqlparse==0.4.4
sseclient-py==1.8.0
sspilib==0.1.0
stack-data==0.6.3
statsmodels==0.14.4
sympy==1.13.1
tabulate==0.9.0
tenacity==8.2.3
tensorboard==2.18.0
tensorboard-data-server==0.7.2
tensorflow==2.18.0
tensorflow-io-gcs-filesystem==0.31.0
tensorflow_intel==2.18.0
termcolor==2.5.0
terminado==0.18.1
tifffile==2024.7.2
tinycss2==1.3.0
tomli==2.0.1
toolz==1.0.0
torch==2.6.0
tornado==6.4
tqdm==4.66.2
traitlets==5.14.1
trame==3.6.3
trame-client==3.2.0
trame-server==3.0.2
trame-vtk==2.8.9
trame-vuetify==2.6.0
truststore==0.10.1
twine==5.0.0
types-python-dateutil==2.9.0.20241003
typing-inspect==0.9.0
typing_extensions==4.12.2
tzdata==2024.1
tzlocal==5.3.1
uri-template==1.3.0
uritemplate==4.1.1
urllib3==1.26.18
usd-core==24.8
vtk==9.3.0
wakepy==0.9.1
watchdog==5.0.3
wcwidth==0.2.13
webcolors==24.8.0
webencodings==0.5.1
websocket-client==1.8.0
websockets==12.0
Werkzeug==3.0.1
wrapt==1.16.0
wslink==2.1.1
XlsxWriter==3.2.3
yarl==1.9.4
zipp==3.17.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions