Macro to add reciprocal links?

John S. shared this question 3 months ago
Discussion Open

Hello
Hello

Have any of you managed to write a macro to add reciprocal links between two selected topics?

Background
I am trying to write a macro in MindManager (v2020) that will create reciprocal links between the two selected topics. If technically difficult, these could be within the same file.
(I find dragging one topic over a second topic and then waiting 2 seconds and then choosing "insert reciprocal links" takes too long when I am doing it multiple times - i.e. once for each of my 100+ Task topics.)

I tried to use ChatGPT to help me but after many attempts, it failed to work out how to add links to topics. All it could do was add a text boxes to each topic - albeit with the title of the other topic contained inside it.

Any thoughts?

J

Replies (3)

photo
1

PS In case it helps, the attached file contains the Macro code that ChatGPT came up with that adds text to the two selected topics.

NOTE: It contains debugging steps and like I say, sadly ChatGPT couldn't work out how to add links to tasks.

photo
1

Btw, on a similar note, is there any way to get windows to move the mouse pointer across the screen itself such that after you click on a local link between topics MindManager leaves the pointer across the screen to be directly over the topic that you have linked to?

J

photo
2

For Each aTopic In selectedtopics
	If lastTopic Is Nothing Then
		Set lastTopic = aTopic
	Else
		aTopic.CreateHyperlinkToTopicByGuid(lastTopic.Guid)
		lastTopic.CreateHyperlinkToTopicByGuid(aTopic.Guid)
	End If
Next

photo
1

Thanks - that looks promising.

My problem is how to execute a macro with minimal steps. I spent a while trying (but failing) to get to the bottom of it. Are there any explainer videos anywhere for how to do this?

Thanks

J

photo
1

i 'll say this is do-able as i have also asked chatgpt to handle multiple maps.

1. since you could have 2 or more active windows, the script should ask you which two map to handle.

2. then in each map you should have selected a topic

3. it's easy using the script to get the map's URL and also the topic's GUID, and then write the hyperlink to each other. what worries you is if there is more than 1 hyperlink


ps, if the api is available also offline in some way, we could feed it to chatgpt more easily.

photo
1

Is it necessary to insert the connections after the mindmap has been created? Or do you build your map from a different source by importing it?


Background: I had to prepare DOCX files to generate mindmaps. In these files I can prepare some stuff so that the mindmap needs no further work.

photo
Leave a Comment
 
Attach a file