API MindManager

Leo SOUILLE shared this question 25 days ago
Answered

Hello everyone,


I develop an Console application with CSharp and I would like to read a MindMap file. I would use the MjService API, where can I found this API and how can I use it ? Which DLL is it ?


Thank you for your help !

Comments (1)

photo
1

I have not seen any documentation for the MjService API. You don't necessarily need an API to read MindManager files. They are zip files which include an XML file. The XML data format is not documented anywhere but the element naming is fairly clear. If you change the extension from .mmap to .zip you can unpack them.

photo
1

I found a documentation of this API.


Here is the link :

https://www.mindmanager.com/en/pages/developers/api/20/#Welcome.html

photo
2

Mindjet Service API (which was for accessing Mindjet hosted files) is deprecated, but you can use this API to access local files:

https://www.mindmanager.com/en/pages/developers/api/20/#MindManager~Documents_members.html

This API is deprecated:

https://www.mindmanager.com/en/pages/developers/api/20/#ConceptsMindjetFiles.html

photo
1

Ok, thank you

Do you know if it's possible to read an XML file of a MindMap in case to analyze if the Mindmap correspond to the template ?

photo
2

MindManager does not keep any data about which template was used to create a document. But you could write a custom attribute to template maps, and use the API to check new maps for this attribute to find out which template it was based on.

photo
1

I'm not sure I understand what you mean but where can I found this API ?

photo
1

Hello,


The template is a document made by me so I would like to read it in case to compare if the document sent by other people correspond to mine.

Can the API you've mentioned before do that ?

photo
2

You can use custom attributes to identify whether a map is from your original template. To do this you could create a special attribute on the central topic in your template, then check other documents for this attribute. If the document has been created from your template, the attribute will be present.

There is no API for comparing the contents of two maps topic by topic. This code would need to be written in an add-in or macro.

photo
1

Ok and the code mcould be written in C# ?

Because to compare I have to develop an application not only an Add-in

photo
2

Yes, this could be done in C#.

If you want to embed new commands in the MindManager interface, then you will need an add-in.

If you do not need to put new commands in the MindManager interface, you could write this as an external application and make a COM connection to MindManager, in the same way that you can connect to Word or Excel.

You could compare two maps by extracting the XML and making a comparison, or by using the API to walk through the maps topic by topic.

photo
1

I have found this dll :

Mindjet.MindManager.Interop.dll


Do you know something about it ?

photo
2

Yes, that is the DLL for the MindManager COM API, which is documented at the link provided above by Amy:

https://www.mindmanager.com/en/pages/developers/api/20/#Welcome.html

If you want to use the COM API, this will give you an overview of capabilities plus detailed documentation in some areas.

photo
1

Is the documentation the same as the version 15 ?

photo
2

This is the documentation for MindManager 20. Since MindManager 15, some of the online services related to file and task management have been deprecated, but the basics are the same. However this documentation will also describe newer features that were not present in MindManager 15. In many cases the detailed description states the MindManager version at which the feature was introduced. In the Appendices there are summaries of the changes in the API between MindManager versions, but this only goes back as far as MindManager 17, which is when this format of API documentation was started.

photo
1

After some research I do not find the documentation.

Can you have the exact name of it ?

photo
2

https://www.mindmanager.com/en/pages/developers/api/20/#Welcome.html

Is this link not working? It should display this:

87f946d614f080c22ab230fae1c9106a

photo
1

It's working but can't find the Interop dll or COM api

I should find it in the Model v20.0.334, don't we agree ?

The link Amy sent earlier is :

https://www.mindmanager.com/en/pages/developers/api/20/#MindManager~Documents_members.html


What is the difference between document and file here ? Because for me "Opens a document from a file" is the same thing than "Opens a file from a file" for me.

photo
1

The link that Amy sent is a page within the documentation. The link I gave is the start page for the documentation. The documentation describes the methods and properties of the COM API. You make a connection from your project to the Interop by adding a COM object reference to the correct version of MindManager:

7f4e498eca0797102fc055deb95c8c83

photo
1

That's what I've made

Where did you have this window ? I'm using Visual Studio 2017 et I haven't that

photo
1

Hi !

I'm back with another question. How can I distinguish the differents subtopics ?


Because I can read the title(central topic), the main topic (1 step to the left or right) and after it's only Subtopics.

photo
1

I have found a property named Level but I don't how to modify it. Do you know something ?

photo
2

Hello Leo. The topic level will not help much to identify topics, and you cannot change the level of a topic.

Topics can be found in several ways.

  • All topics have a GUID (Topic.Guid) which does not change over the lifetime of a topic. You can find a topic from its Guid with Document.Range(mmRangeAllTopics).FindByGuid(guid as string)
  • You can find all topics in a map with the Range collection, Document.Range(mmRangeAllTopics) which is a collection of Topic objects.
  • You can find topics by following the hierarchy. Every topic has a collection of SubTopics and CalloutTopics. The Central Topic of a map is a property of the document (Document.CentralTopic) so you can begin there in every map.
  • There is also a TopicFinder object which can search for topics that match a mask, and call back for each matching topic that it finds. I do not recommend trying to use that to begin with.

photo
1

I don't understand how Range work


UPDATE: It's ok I find how does it work but what is the GUID ?

photo
1

https://www.mindmanager.com/en/pages/developers/api/20/#MindManager~Range.html

The GUID is a unique string that is assigned to the topic when it is created. Add-ins sometimes save topic GUIDs so that they can find a topic later, even if the user has moved it in the map. Guids are read-only, so you can read Topic.Guid but not change it. The GUID used in the API is a Base-64 encoded version of a standard Guid.

photo
1

Ok, and where can I found it ?

photo
1

UPDATE: My bad, I find it with your previous message.


Thanks

photo
1

In my code, I have:


Document map = mindjet.AllDocuments.Open(filePath);

Topic topic = map.CentralTopic;


foreach (Topic subto in topic.AllSubtopics)

{

subto.SetLevelOfDetail(2);

Console.WriteLine(subto.Level);

}


My problem is that th e printed Level is 1 and not 2 so I can't read what I want. Have you got an idea or not ?

photo
1

Topic.SetLevelOfDetail controls how many levels of subtopic are visible in the map. This is equivalent to clicking the "+" object in the map or pressing Ctrl+D.

Topic.Level is the depth of this topic from this central topic. Main Topics are all Level 1.

These two are not related and you cannot change the location of a topic by writing to Topic.Level. All the subtopics of the central topic will have a Topic.Level value of 1, as your code shows.

photo
1

And I can't modify the Level to see the other subtopics ? Because I would like to see the subtopics Level 2.

For the GUID, I have not find the solution to have it for the subtopics level 2 or 3

photo
2

You can find the topics at level 2 in a map in the Topic.Subtopics collections of the main topics themselves. You can find all the topics in a map using recursive code to drill down into the tree.

The description of the Document.CentralTopic property in the documentation explains the different ways to find the topics in a map, and gives some examples using MindManager Macros. It is a good idea to experiment with macros first, so that you can resolve issues with the MindManager object model, before starting work on a console application or add-in.

https://www.mindmanager.com/en/pages/developers/api/20/#MindManager~Document~CentralTopic.html

photo
1

OK great I managed to read every subtopics but how can I read the numbering because I can't find it

photo
1

Great!

Automatic topic numbering can be read at

Topic.Title.GetDisplayText(MmDisplayTextFlags.mmDisplayTextNumberPrefix)

This will return the numerical prefix before the topic text.

photo
1

Ok, thanks !

It's not working


Error message is "Cannot convert from 'MmDisplayTextFlags' to 'int'

photo
1

I have not stated but the numbering is on the level 4 and after.

I'm sorry, I've just understand how it works

photo
Leave a Comment
 
Attach a file