-
Hi @RobPasMue, modeler_gs.run_discovery_script_file(file_path=r'my_script.py', import_design=True)
GeometryRuntimeError: Script run failed: The collection is empty. Where do you run the script, in Discovery API or SpaceClaim API? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Hi @dkowollik! To answer your question, the script is ran in the Geometry Service itself. The API version should be the same for all anyway: Discovery, SpaceClaim and Geometry Service (from what I know) Now, the problem you might be facing is that the version you are trying to use is too old for the Geometry Service. The Geometry Service has only been provided since 23R2 as part of the Ansys installation and, unless I'm mistaken, only scripts with V23 or later are supported. By default the Geometry Service also uses the API version that is aligned with itself (i.e. V24 if you are using Ansys 24R2) We have a test in which we are running the Geometry Service and testing a SpaceClaim API script here: pyansys-geometry/tests/integration/test_runscript.py Lines 37 to 48 in 719d21d The script we are sending over to the Geometry Service is found here: I would recommend you also specify the full path to the script - rather than just its relative path. Nonetheless, we need to improve things there - better error outputs at least!! |
Beta Was this translation helpful? Give feedback.
-
Hi @RobPasMue, @dkowollik,
Please let us know if that fixes the issue you're having. |
Beta Was this translation helpful? Give feedback.
-
Hi @dkowollik - following the implementation on #1395:
See more instructions on the API reference for I believe this would serve as an answer to the main topic of discussion in the description. If so, please mark as answer for other users to benefit from it. |
Beta Was this translation helpful? Give feedback.
Hi @dkowollik - following the implementation on #1395:
See more instructions on the API reference for
modeler.open_file()
at https://geometry.docs.pyansys.com/version/stable/api/ansys/geometry/core/modeler/Modeler.html#Modeler.run_discovery_script_fileI believe this would serve as an answer to the main topic of discussion in the description. If so, please mark as answer for other users to…