Convert all selected topics into a new shape

Michael S. shared this question 3 years ago
Answered

Hi,

I would like to be able to convert all the selected topics shape to a new shape.

So far I am able to make changes to the topics and also fill all selected topics with a different colour using the code below. But having researched the VBA options I am unable to convert to a new shape.

I have found the VBA object - mmStandardTopicShapeCircle, but I do not know how to use it.


Also, is this the most efficient way to carry out the process?

Thank you in advance for any assistance.

Set currentTopic = currentDoc.Selection.PrimaryTopic
For Each currentTopic In MMapp.ActiveDocument.Range(mmRangeAllTopics)
If currentTopic.IsSelected Then
currentTopic.UserIcons.AddStockIcon(mmStockIconSmileyHappy)
currentTopic.Font.Size = 12
currentTopic.Font.Bold=True
currentTopic.FillColor.SetARGB(255,255,0,100)
Else
'Do Nothing
End If
Next currentTopic

Replies (4)

photo
1

It may be a lot easier to just create a MM template with the new layout of the topics and apply that to your map.

Any user can find how to do it in the Help

No need for VBA or other programming, and that means the functionality is available to all, not only to those who understand VBA etc.

photo
1

Hi Ary,

Thank you for your suggestion.

I am setting up personal shortcuts for myself and interested in exploring VBA in more detail. Is it possible by VBA?

photo
1

Hello Michael,

I really have no idea. I never use VBA with MindManager because it is too much effort for too little effectivity.


However, if you want to learn VBA, consider the free https://www.codecademy.com/

Or maybe @NickDuffil can give you a hint.

photo
1

Hello Michael,

I'm not sure if this can be done with VBA but you can accomplish this with SmartRules if the topics meet the Trigger criteria.

Trigger based on these options -

15d1c4e756c93b0065658d7a5fe6c430


Effect Type: Topic Shape

30ad03a1a20a7b480b36a863c649510b


Best regards,

-Marian

photo
1

You could define a Topic-Style.

That's an easy way to change the topic shape for all selected topics to different one.

You can use Topic Styles in the SmartRules and Power-Filter/Select.

Best Andreas

photo
2

To add to the comprehensive list of answers: you can do this with MindManager's VBA script. It is not very obvious because each topic requires three shapes to be defined: the shape that is used when the topic is a Standard branch in a tree, the shape used when it is a Floating topic, and the shape used when it is a Callout topic. In each location, the shapes available are from a separate enumeration because they need different geometries.

ActiveDocument.Selection.PrimaryTopic.Shape.SetTypes(mmStandardTopicShapeCircle, mmFloatingTopicShapeCircle, mmCalloutTopicShapeCapsule)
The above code fragment uses Topic.Shape.SetTypes() to set the shape of the currently selected topic to a circle if it is in a tree or a floating topic, and a Capsule if it a callout topic. You can see the different shapes being applied by moving the topic to a different location.

photo
1

Hi Nick, that is perfect


Thank you

---