Efficiency Tips & Tricks for OpticStudio

  • 2 September 2020
  • 36 replies
  • 2677 views

Userlevel 4
Badge +3

Share your tips & tricks for efficiently using OpticStudio with the community! 


There are lots of little ways that we adapt our use of OpticStudio to streamline our work. These are usually learned over time, from colleagues, or from technical support, but they aren't typically found in other product education resources. You might have a favorite keyboard shortcut, saved settings for a particular analysis, a macro that automates 3 steps in your process tied to a hotkey, or a million other ideas. Help your fellow OpticStudio users and learn some new tricks yourself.


36 replies

Userlevel 4
Badge +3


In the Project Preferences > Toolbar section, you can set up your own favorites button bar. This way, you don't have to navigate tab-to-tab for the features/analyses you use most.


 

Userlevel 6
Badge +2

Re-run macros by updating the Text Viewer


When we run a macro, a Text Viewer window appears. Unless otherwise specified, the Text Viewer will display any PRINT commands. This Text Viewer is now tied to the macro. If we double-click the Text Viewer window (or click the Update button on the window), the macro will be re-run. This allows us to make changes to the macro, save it, and quickly re-initiate the macro to see the results. 


 



 


I am attaching a video for reference. Place the macro and Text Viewer side-by-side and you will see that you can quickly update and debug your code!

Userlevel 2
Badge +1

Arrange opened analysis windows by using Window Options


Sometimes, OpticStudio interface will looks a little messy if a lot of floating analysis windows are opened, like figure below:



A method can resolve this issue - using Window Options.There are several options can be selected under Window Options, you can nevigate those option by clicking Setup tab -> Window Options:



For example, if Dock All Windows or Dock All Windows to Single Workspace is selected for those analysis windows, all opened windows will be docked at single workspace with different tabs. If there are multiple windows under similar catagories are opened, dock them in single workspace will be useful:



If your analysis windows are opened for different types of capability and you want to observe them all at sametime, my recommendation is using Tile All Windows option:



For more information about Window Options, you can nevigate to Help Manual section: The Setup Tab > Window Control Group > Window Options


Enjoy OpticStudio!


 

Userlevel 3
Badge +1

Set many parameters to variables at once


When you have to set many parameters as variables, don't bother setting them one by one.

All you have to do is select them all with your mouse and press ctrl+z!



press ctrl+z!



Isn't that convenient~

Userlevel 6
Badge +2

Open the settings before running an analysis: Show Options First


When an analysis takes some time to update, it can be frustrating to wait and especially when the settings are not yours.

But there is a setting in Setup... Project Preferences...Graphics...Show Options First. When it is ticked, the settings box will appear before any analysis graphic or text is computed and displayed.


Userlevel 4
Badge +2

Perform arithmetic operations directly in the cell:



Quite useful to modify parameters and to convert from radius to curvature!


 


 

Userlevel 4
Badge +2

Here are my keyboard shortcuts!

 

200903-091913-image.png

 

 

 

 

Userlevel 4
Badge +2

I also like the report tool to display a saved combination of analyses, here is an example:


Userlevel 4
Badge +2

Finally, I use Windows 10 color filter, invert greyscale for long OpticStudio sessions because white screens give me a headache in no time...


Userlevel 4
Badge

I really like '/p' when changing materials. It keeps the power of the lens (i.e. the focal length of the lens) intact when changing the material. This way, you only have to worry about the changes in the aberrations, and not the paraxial focal length of the system.


Below is an example changing a singlet lens from N-BK7 to SF2. /p will automatically change the radius of the lens to accommodate for the index change, to keep the focal length 400mm. 




Userlevel 5
Badge +2

Move selection when typing into Editors


If you would like to customize the data in multiple cells in any of the Editors, it can be useful to set which direction you would like to move the selection automatically after pressing Enter. If it is one specific parameter you want to edit for multiple surfaces/objects, select Down or Up move. If it is a specific/object surface you want to modify, select Right or Left. Or you can just untick the box, so there is no move in any direction:

Userlevel 4
Badge +1

1. Usage of the Reload All Surfaces button


After making changes to a text file that's used to define certain Surfaces/Objects/Apertures, for example, User Defined Aperture, Source .DAT file, Polygon objects, use the Reload All Surfaces buttom to update the change in the Lens Data Editor / Non-Sequential Component Editor. 



2. Double click inside any analysis window to update results


3. Leave the Auto Apply button unchecked


This will stop analysis window from auto re-compute until all changes are entered.



 

Userlevel 1
Badge +1

Easily identify parameter numbers


Many operands and ZPL commands require you to put in the 'parameter number' of a surface you are interested in.


Let’s say as an example, I wanted to find out what the parameter number is for 'Tilt About Z' on a Coordinate Break.



The easy way to identify the parameter number will be to insert a standard surface above the Coordinate Break and compare the column headers as you switch back and forth between the two surfaces.



We can see from this that when the Standard surface is highlighted, the column header will change to ‘Par 5’. So, Tilt About Z corresponds to Parameter 5.

Userlevel 1
Badge +1

Insert rows above and below in editor


If we press insert on our keyboard, we will get a new row in our editor above the row we currently have highlighted.


If we want to insert a row below the row we currently have highlighted, we can use ctrl+insert.


Userlevel 3
Badge +2

Don't forget copy/paste!


The editors in OpticStudio are essentially spreadsheets, so if you need to enter multiple similar rows into an editor then using standard copy/paste functionality can be a real time saver.


For example, if you'd like to calculate the chief ray height at multiple surfaces in the MFE then you can simply set up the required operand for a single surface.



Then copy and paste multiple instances.



Then all that is needed is to modify the surface number on each line.



For added speed this is best done by using th ctrl+c (copy) and ctrl+v (paste) keyboard shortcut, although it is also possible with the mouse by left-clicking the row number to highlights and then right-clicking the row number to bring up the context menu.



The attached video shows the whole process. This technique will work in all OpticStudio editors. It will also work with blocks of operands/rows, so in the example above you could initially setup lines for both the chief and marginal rays height and copy/paste simultaneously.

Userlevel 6
Badge +4

Thanks, Chris. But on my computer, ctrl+c is copy and ctrl+v is paste. Which is good because it's pretty much industry standard. Now if only I could get ctrl+z back as undo. Although I've been using it for variable for nearly 20 years, so it might be too late to reprogram myself.  ;-)

Userlevel 3
Badge +2

Apologies David. Copy is indeed ctrl+c and paste is ctrl+v. Thanks for pointing that out. I've corrected my post. 

Userlevel 5
Badge +1

Another neat thing to keep in mind is that some analyses support the use of the left/right arrow keys when looking at a surface-specific result. For example, we can use the right arrow key to scroll through different surfaces in the Footprint Diagram:



Another analysis that uses this is the Beam File Viewer. Very handy when you want to check the rays/beam at different surfaces relatively quickly!


And David, you might have seen this already, but you can tweak existing shortcuts in the Project Preferences:



Though, we don't have anything in OpticStudio to re-program yourself 😄


~ Angel

Userlevel 7
Badge +2

To complement what Berta was saying about arithmetic operations in a cell. If you want to subtract a number X from a cell, you should type plus, minus, and then your value X.


+-X

Otherwise, I think it just puts the value minus X into the cell.


Userlevel 6
Badge +2

Here are Thomas' shortcut keys.

Userlevel 2

Hi Sandrine,


I couldn't find the file 'OpticStudio_new_shortcuts.CFG' inside the zip.

Userlevel 4
Badge +2

You are right, here they are. 

Userlevel 3
Badge

Re: Open the settings before running an analysis: Show Options First


Posted 28 days ago by Sandrine Auriol, Zemax Senior Optical Engineer


'When an analysis takes some time to update, it can be frustrating to wait and especially when the settings are not yours.

But there is a setting in Setup... Project Preferences...Graphics...Show Options First. When it is ticked, the settings box will appear before any analysis graphic or text is computed and displayed.'


I will try this immediately!!  I hate waiting for a long analysis to start running when I re-open a file, and having to remember to try to interrupt it with TERMINATE.  But...


Couldn't you guys just make 'Auto Apply' UNCHECKED be the default condition on opening an analysis??

Userlevel 5
Badge +1

Hi there!


Thanks for your follow-up post here. If you wanted to make Auto Apply be unchecked by default, I believe you can do that in the Project Preferences...General tab:



Let us know if you have any more questions/if I've misunderstood your request here!


~ Angel

Userlevel 3
Badge

Thanks, Angel!


I'll probably use both of these settings!


-- Greg

Reply