ansys/pyansys-geometry

``script_args`` should be an optional argument on ``run_discovery_script_file`` argument

Closed this issue ยท 2 comments

๐Ÿ” Before submitting the issue

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

๐Ÿž Description of the bug

I want to run a script in SpaceClaim using run_discovery_script_file, but I'm unsure what to include in script_args. I have reviewed the original documentation, but it did not provide guidance on how to manage this.

from ansys.geometry.core import launch_modeler_with_spaceclaim

modeler_discovery = launch_modeler_with_spaceclaim()

modeler_discovery.run_discovery_script_file(file_path=r'E:\2023project\nncx\muti-optimize\Mesh_Gem\1.scscript',script_args=script_args)
image

๐Ÿ“ Steps to reproduce

I want to run a script in SpaceClaim using run_discovery_script_file, but I'm unsure what to include in script_args. I have reviewed the original documentation, but it did not provide guidance on how to manage this.

๐Ÿ’ป Which operating system are you using?

Windows

๐Ÿ“€ Which ANSYS version are you using?

23r2

๐Ÿ Which Python version are you using?

3.10

๐Ÿ“ฆ Installed packages

numpy
pandas
ansys-geometry...

Hi @XIAO-GUO-commint - if you do not want to pass in any script arguments then you do not need to pass any. For now, pass in an "empty dictionary" (i.e. {}).

We have to change the method to make script_args as optional. @AlejandroFernandezLuces can you take care of this? It is an easy fix. We will do a patch release right afterwards

Hi @XIAO-GUO-commint - if you do not want to pass in any script arguments then you do not need to pass any. For now, pass in an "empty dictionary" (i.e. {}).

We have to change the method to make script_args as optional. @AlejandroFernandezLuces can you take care of this? It is an easy fix. We will do a patch release right afterwards

Sure! I'll take a look.