Can custom properties for a topic be programatically collpased or shown by macro?

  • 1
  • Question
  • Updated 2 years ago

Can custom properties for a topic be programmatically collapsed or shown by macro? I know that that you can do this manually (hide/show) with the small green arrow after adding custom properties. But, I have a large map about would like to do this automatically. If so, can you share the code?

 (PS. iterating though the branches to select the topics with custom properties, adding them to the document selection collection and then and then clicking on one of the topic arrows is painful, but, I am looking for a more positive way of doing this. )

Photo of Philip Stipcevich

Philip Stipcevich

  • 31 Posts
  • 1 Reply Like

Posted 2 years ago

  • 1
Photo of Nick Duffill

Nick Duffill, Champion

  • 515 Posts
  • 172 Reply Likes
Writing a Boolean value to Topic.DataContainer.Visible will expand or collapse the custom properties in a topic.
Photo of Colin Horner

Colin Horner

  • 130 Posts
  • 18 Reply Likes
Hi Philip I have the Macro's
Photo of Colin Horner

Colin Horner

  • 130 Posts
  • 18 Reply Likes
Hi Nick can you please elaborate - I'm not familiar with that one
Photo of Nick Duffill

Nick Duffill, Champion

  • 515 Posts
  • 172 Reply Likes
Hello Colin, hello Philip

It's a pity that there is no context menu on the items in the "Elements" page of the marker index task pane, and no way to filter topics with custom properties in the power filter.

Try this:
Sub Main
    ShowHideDataContainers(ActiveDocument, False) ' True to show, false to hide
End Sub

Sub ShowHideDataContainers(ByVal m_Doc As Document, ByVal b_Visible As Boolean)
    Dim m_Topic As Topic
    For Each m_Topic In m_Doc.Range(mmRangeAllTopics, True)
        If m_Topic.DataContainer.DataContainerType <> mmDataContainerTypeNone Then
            m_Topic.DataContainer.Visible = b_Visible
        End If
    Next
End Sub

Photo of Colin Horner

Colin Horner

  • 130 Posts
  • 18 Reply Likes
Gr8 this closes them
Photo of Philip Stipcevich

Philip Stipcevich

  • 31 Posts
  • 1 Reply Like
Many thanks, works like a charm!
Photo of Nigel Goult (Olympic & MIVAP)

Nigel Goult (Olympic & MIVAP)

  • 348 Posts
  • 135 Reply Likes
There is also a function in the MAP for MindManager add-in that toggles custom properties on/off along with many other useful tools.

http://www.olympic-limited.co.uk/olympic-add-ins/map-for-mindmanager/

 
Regards
Nigel

MAP - The Ultimate Add-in for MindManager 2017!   - Become a MindManager Power User FAST! www.mapformindmanager.com
Photo of Colin Horner

Colin Horner

  • 130 Posts
  • 18 Reply Likes
Hi Philip I agree with Nigel - take a look at MAP for MindManager - it provides a host of functions to help automate your MindManager experience
Photo of Colin Horner

Colin Horner

  • 130 Posts
  • 18 Reply Likes
Hi Nick Thanks for the help.  I am looking forward to enrolling on your MindManager Macro Masterclass, and learning how to DIY http://bit.ly/2fewRAe