Skip to main content

I have many projects using the same DLL (non-sequential object). The DLL is general. The DLL retrieves a unique data file for each project.

How does the DLL find or look up the name of the project or the file path for the project (each project is in its own path)?

Yes, I can keep this straight manually, renaming, and moving stuff around when changing projects. But why? This is what we have computers for!

thanks,

 

Hi Paul,

The DLL doesn’t know anything about the file structure in OpticStudio. It’s just code that is passed some data by OS, and returns some data. You need to manage all the data io from within your DLL.

ZOS-API on the other hand knows everything, as it is an API to the whole OS capability, and not just a ‘black box’ like the DLL.


Hi Mark, thanks for the quick response and the API tip. I have not looked at using the API. However, I can conceive of using the API to send the name and path for the current project to a function in the DLL. The trick would be for the API function to call the DLL before Zemax does. Assuming, of course, that the API has access to name and path and that Zemax can be set up to execute the API function first. I will be looking into this.


Reply