Hi all,
I’ve been modifying .zmx files using Python for a few years now and have been using my own module and PyZOS for a majority of it now. However, my current project has a bit of a road block I’m not sure how to get around.
What I would like to do is take a surface from a file I’ve already created and have it be the exact same surface in a different file. I could have the code insert the surface, but if possible I’d like to avoid inserting and deleting surfaces as it may effect other parameters in the system (i.e. Merit Functions operands and whatnot).
What I’m hoping to code is something like the following
import zospy as zp
zos = zp.ZOS()
oss = zos.connect()
oss.load(‘file1’)
oss2 = zos.create_new_system()
oss2.load(‘file2’)
first_surface_file1 = oss.LDE.GetSurfaceAt(1)
first_surface_file2 = oss2.LDE.GetSurfaceAt(1)
#Modify somehow
first_surface_file1 == first_surface_file2 #would like to be True
I was thinking of somehow looping through the surface params but that’s proving difficult. I was curious what others thought.