Where are the OAD functions documented?

Discuss macros to control the hardware functions of your ZEISS microscope
Post Reply
Xavier Snelgrove
Posts: 2
Joined: Fri Feb 19, 2021 8:12 pm

Where are the OAD functions documented?

Post by Xavier Snelgrove »

Hello,

I'm developing some macros in Python to control Zen, and am looking for documentation anywhere with the objects and methods available to be controlled via the Python COM interface. For instance this post:

viewtopic.php?f=4&t=830

shows a

Code: Select all

Zen.Devices.Focus.ActualPosition
variable which I can not find documented anywhere except for in the autocomplete of the macro editor itself. Is there no other way to browse the documentation so that I can, e.g. flip through and look for methods that would be useful as we design our application? I note that there is a Macro ObjectModel documentation available in the macro editor's help, but that seems to not include most of the actual functions and variables such as the

Code: Select all

ActualPosition
one or

Code: Select all

TargetPosition
Thanks for your help!
CarlZeissMicroscopy3
Posts: 180
Joined: Wed May 20, 2020 10:10 am

Re: Where are the OAD functions documented?

Post by CarlZeissMicroscopy3 »

Hello Xavier Snelgrove,

when using the macro editor choose 'Help' in the menu bar and then select "Macro Object Model...".

I hope this helps.
David Rose
Posts: 1
Joined: Thu Dec 02, 2021 11:23 pm

Re: Where are the OAD functions documented?

Post by David Rose »

Hi:

Is the documentation available anywhere online? I will be writing Python code to control image acquisition on a Zeiss LSM 980 but don't have physical access to the scope and don't have a Windows machine so am unable to access the Zen software itself.

Thanks!
CarlZeissMicroscopy3
Posts: 180
Joined: Wed May 20, 2020 10:10 am

Re: Where are the OAD functions documented?

Post by CarlZeissMicroscopy3 »

Just move to the 'Open Application Development (OAD) for ZEN (blue edition)' overview e.g. by clicking the small link at the top.

You will find a 'Documentation (read-only)' area at the bottom.
I will be writing Python code to control image acquisition on a Zeiss LSM 980 but don't have physical access to the scope and don't have a Windows machine so am unable to access the Zen software itself.
Sorry, from my point of view this is not possible but you may get a general understanding.
fabian Rol
Posts: 5
Joined: Thu May 12, 2022 4:34 pm

Re: Where are the OAD functions documented?

Post by fabian Rol »

Hello,
I am new in writting macro in Zen (but not new in python) and I don't understand where to find the information about the methods and the different objects.
The scripting language is in Python, but the list of objects and methods we can find on the scripting window itself is in C, not in python...
When reading macro example methods or objects often starts with "Zen." as if Zen is an object or a library but it is loaded nowhere on the macro.
It is probably naive questions, but if there were a manual (that may exist but that I have not found) or at least a list of objects and methods used in Python (again it may exist but I have not found where) that would be very helpful.
Thank you in advance for your help
Best regards
Fabian
CarlZeissMicroscopy3
Posts: 180
Joined: Wed May 20, 2020 10:10 am

Re: Where are the OAD functions documented?

Post by CarlZeissMicroscopy3 »

Hello fabian Rol,

I am new in writting macro in Zen (but not new in python) and I don't understand where to find the information about the methods and the different objects. The scripting language is in Python, but the list of objects and methods we can find on the scripting window itself is in C, not in python...

From your short introduction I guess that until now you used 'normal Python’. Normal Python is based on native (unmanaged) code.
Zen is based on the .Net Framework and therefore we have to use 'IronPython' for ‘interaction’, as only 'IronPython' is able to use .Net code, which is managed code. All the classes/objects a macro refers to are taken from Zen ‘directly’. Zen itself is written in C# and therefore the documentation of the object model is in .Net (C#, not C) as well.

Please keep the difference of normal Python and IronPython in mind when it comes to the ‘import’ of libraries etc.

When reading macro example methods or objects often starts with "Zen." as if Zen is an object or a library but it is loaded nowhere on the macro.

This is really a very good observation! The solution is, that the Zen object (plus other things) is loaded in the ‘back’ when a macro is started.

As far as documentation is concerned, you may have already found viewforum.php?f=14 (which I updated today!)

But there is no further macro documentation, especially as far as the class/object documentation is concerned. Maybe it really makes sense that you deal with the .Net (C#) documentation as the .Net Framework documentation is in a similar style and it offers a very wide range of additional functions that you can import in IronPython.
fabian Rol
Posts: 5
Joined: Thu May 12, 2022 4:34 pm

Re: Where are the OAD functions documented?

Post by fabian Rol »

thank you very much for your answer, that will be most helpful
and thank you for the manual on developing macro that I did not have yet
Best regards

Fabian
Rikkie Tick
Posts: 2
Joined: Wed Jul 19, 2023 12:40 pm

Re: Where are the OAD functions documented?

Post by Rikkie Tick »

If you can't find the documentation on the website, try reaching out to their technical support team directly. They can provide you with the necessary documentation and possibly additional assistance in developing macros using the Python COM interface.
Carlost Barron
Posts: 2
Joined: Sat Nov 04, 2023 2:18 pm

Re: Where are the OAD functions documented?

Post by Carlost Barron »

Hey there! I've been trying to find information on the OAD functions, but it seems a bit elusive. Has anyone come across documentation for them? I'd really appreciate any pointers or links you can share.
Carlost Barron
Posts: 2
Joined: Sat Nov 04, 2023 2:18 pm

Re: Where are the OAD functions documented?

Post by Carlost Barron »

Certainly! To control Zen using Python through the COM interface, you'll need to refer to the Zen API documentation. Unfortunately, as of my last knowledge update in January 2022, specific details about Zen's API may not be readily available in a public domain. I recommend checking the official documentation provided by Zen or contacting their support for comprehensive information on objects and methods accessible through the Python COM interface. If there's a specific post or resource you mentioned, make sure to explore it thoroughly for relevant insights.
Post Reply