You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if I try to use the run_discovery_script_file to send anything other than individual string parameters, it fails. While this is slightly documented https://geometry.docs.pyansys.com/version/dev/api/ansys/geometry/core/modeler/Modeler.html#Modeler.run_discovery_script_file() it doesn't say that the dict can be exclusively flat dict. I have tried all variations (nested dictionaries, tuples, lists of strings etc) and only a key:string combination works for the script_args sent to a discovery file.
And, to make it useful in the future, it would be nice to be able to send more data to the disco launch.
📝 Steps to reproduce
run the following script to try to send a dict with two keys, the second key being a list of a single string, but it will fail with more than one also.
import tempfile
from ansys.geometry.core import launch_modeler_with_discovery
import os
version = 242
file_name = 'dummy.py'
path2dummy = os.path.join(tempfile.gettempdir(),file_name)
with open(path2dummy,'w') as f:
f.write('#nothing')
input_dict = {'a':'1', 'b':['2']}
modeler_discovery = launch_modeler_with_discovery(product_version = version)
modeler = modeler_discovery
values = modeler.run_discovery_script_file(path2dummy, script_args = input_dict)
modeler.close()
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
242 and/or 251
🐍 Which Python version are you using?
3.12
📦 Installed packages
ni
The text was updated successfully, but these errors were encountered:
🔍 Before submitting the issue
🐞 Description of the bug
if I try to use the run_discovery_script_file to send anything other than individual string parameters, it fails. While this is slightly documented https://geometry.docs.pyansys.com/version/dev/api/ansys/geometry/core/modeler/Modeler.html#Modeler.run_discovery_script_file() it doesn't say that the dict can be exclusively flat dict. I have tried all variations (nested dictionaries, tuples, lists of strings etc) and only a key:string combination works for the script_args sent to a discovery file.
And, to make it useful in the future, it would be nice to be able to send more data to the disco launch.
📝 Steps to reproduce
run the following script to try to send a dict with two keys, the second key being a list of a single string, but it will fail with more than one also.
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
242 and/or 251
🐍 Which Python version are you using?
3.12
📦 Installed packages
The text was updated successfully, but these errors were encountered: