How to get the current version of MindManager from a macro ?

Alga shared this question 47 days ago
Discussion Open

Hi,

- I can't manage to get the current version of MindManager from a macro.

- I'd need it to build a dynamic path to some MM icons in the library/ENU.../..

-> Because typicaly the path includes :

a) the current user, no issue for that, ex:
Dim sUserPath As String
sUserPath = Environ("USERPROFILE")

b) and the current MindManager main version '23', ... '24', which I can't manage to read from a macro. If it can be read dynamicaly then no need to change it anymore at next version update...

- I see in the model that normaly 'Version' is a property of the Application object. It's easy to access the activedocument, but how do we access the active application to read it's version ?


- Please can a MM Wizard bring me some lights ?

Thanks a lot for your help,

KR,
Alga

Replies (1)

photo
1

Hi,

- Found it in the mean time. The application object does not need to be explicitely referenced from a macro, one can access it immediately, so it is as simple as:
Dim sMMVersion As String
sMMVersion = Version

- Another question I have though, is how can we read App Studio tokens from a macro ??

- Please can a MM Wizard bring me some lights :) ??

Thanks a lot for your help,

KR,
Alga

photo
2

Hello Alga

The App Studio developer guide lists the App Studio API methods and properties. There is a method for reading a token value described at Technical Reference > Using MindManager Macros > API Reference > Methods and Properties > GetToken().

To use this you will need to connect from your macro to App Studio. If you look in almost any of the macros that are included in the Apps available from the MindManager web site, you will see the code for the "AddIn" function which returns a pointer to App Studio. Currently, the App Studio type library is not registered so there is no Intellisense (auto completion), but if you enter the method and property names exactly they will work.

photo
1

Thanks Nick, I'll give it a try.

KR,
Alga

photo
Leave a Comment
 
Attach a file