We have created a public repository called https://github.com/ansys/optical-automation. We are hoping to gradually move our solutions to this Ansys open project on GitHub.
How to use Ansys optical-automation
Ansys optical-automation comes with a documentation: https://ansys-internal.github.io/optical-automation/
This section shows how to clone the GitHub repository and run the code in Visual Studio.
Note the Visual Studio is not absolutely required. Users can use their preferred tool to sync the GIT repository and preferred IDE tool to run the Python project. Here we simply use Visual Studio as an example.
Visual Studio installation
Users can download and install the latest Visual Studio in the following link: https://visualstudio.microsoft.com/vs/community/
During the installation, the Python development must be selected as below.
GitHub repository configuration
After the installation, we can launch the Visual Studio and click Clone a repository.
Copy and paste the link below to the Repository location.
(Please don’t open this link in Browser and then paste in Visual Studio, this will change the link)
https://github.com/ansys/optical-automation.git
Run Rayfile Converter
For example let’s run the Rayfile converter. The rayfile_converter_example.py can be found in Solution Explorer >Ansys_optical_automation > Application > Rayfile_converter_Example.
By double clicking, we can open rayfile_converter_example.py.
By pressing Shift+Alt+F5, you can run the conversion tool. A window will prompt for selecting the file you want to convert. Users can select .ray, .sdf and .dat in this window for conversion. The converted file will be generated in the same folder as the file we select.