Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a set glass data functionality? #98

Open
echatziz opened this issue Nov 28, 2019 · 5 comments
Open

Is there a set glass data functionality? #98

echatziz opened this issue Nov 28, 2019 · 5 comments

Comments

@echatziz
Copy link

I want to be able to alter the glass data parameters, eg. the transmission data. In ZPL there is a function GETGLASSDATA. Have you implemented sth that behaves like that? But in my case I need sth like setglassdata.

I've searched the source code, but didn't see anything. Perhaps, I've missed it though.

Thank you.

@echatziz
Copy link
Author

Since I am quite desperate for this, I am willing to implement it myself, if it can be done, given some direction. Otherwise, I'll have to throw out all my code and redo it in zos api

@LucVV
Copy link
Contributor

LucVV commented Nov 29, 2019

Hi @echatziz,

I also cannot find an implementation of that funcition, maybe @indranilsinharoy has an idea but I guess you will have to do the implementation yourself. I estimate that it it possible. I guess that you can make a copy of any function that gets data through the DDE client, and change the string command to get this data out. You can also pass parameters through thus string command, you can have a look at e.g. zGetTextFile() in zdde.py. Does that help you?

@echatziz
Copy link
Author

echatziz commented Nov 29, 2019

From what I've seen in the Zemax manual, although there is a ZPL command GETGLASSDATA, there isn't an ITEM with this functionality. Where ITEM is the function passed to the ZEMAX server. So, I guess it cannot be implemented, unless you can define your own item somehow.

Or did you mean to get the text file of the glass report with zGetTextFile() and edit it so I can change the glass parameters?

@LucVV
Copy link
Contributor

LucVV commented Nov 29, 2019

Unfortunately, then I guess it is not possible this way. How many times do you need to change the glass data? Otherwise you might be able to make a catalogue by hand (or by using the zos-api) and then selecting it by zGetGlass() and zSetGlass()

@indranilsinharoy
Copy link
Collaborator

Hi @echatziz , @LucVV ,
Can you use the function zExecuteZPLMacro() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants