Hello all,
I am new to the ZOS API, and would like to know how to get the file name once the connection has been done. I am using Python and I have tried :
TheApplication = TheConnection.ConnectAsExtension(0)
TheSystem = TheApplication.PrimarySystem
print(TheSystem.SystemName)
but I can’t get the name of the zemax file. Any idea how get it?
Use
TheSystem.SystemFile
This returns the full file path. If you just want the file name, you can import os and use:
file_name = os.path.basename(TheSystem.SystemFile);
Thank you Michael.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.