Turning OFF The Cross Functional Flowchart Addon in Visio

Following on from my last blog, my colleague also needs to stop the Cross Functional Flowchart behaviour in a Visio Diagram.  Well, I was almost fooled again into thinking that it might be as simple as removing the Persistent Events using the tool in the Visio SDK.

image

Well, deleting them was no problem, but the DocumentOpened event was re-added as soon as the document was saved.  A little investigation revealed that there are 56 EventList items in a Cross Functional Flowchart diagram (after deleting the two PersistentEvents), but only 44 in a standard Visio document (on my Visio 2007 Pro installation).  So, there are an extra 12 that have been added … just ready to spring back into life when the actions they are listening to are fired.  One of these must be the DocumentSaved event, so simply disabling the events before saving (and remembering to switch them back on), allowed me to remove the Cross Functional Flowchart add-on.

One caveat, dragging a Functional band master back onto a page will switch it back on again.

Public Sub RemoveCFF()
Dim evt As Visio.Event
Dim i As Integer
    For i = Visio.ActiveDocument.EventList.Count To 1 Step -1
        Set evt = Visio.ActiveDocument.EventList.Item(i)
       If evt.Persistent = True Then
            If evt.Target = "CFF"
Then
                Debug.Print evt.Target
                evt.Delete
           
End If
        End If
    Next

    On Error Resume Next
    Visio.Application.EventsEnabled = 0
    Visio.ActiveDocument.Save
    Visio.Application.EventsEnabled = -1
End Sub

Posted in Visio. 2 Comments »

2 Responses to “Turning OFF The Cross Functional Flowchart Addon in Visio”

  1. Shalin Says:

    Will changing this will affect the visio system when drawing diagrams other than flowchart . Thanks for the add-on post please clarify.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

davecra.wordpress.com/

Microsoft Office Development, and more...

PowerShell.Amsterdam

Automate, Accelerate, Accurate

johnvisiomvp

Life with Visio and other Microsoft Toys!

Title (Required)

Windows Server Essentials Tips & Tricks

Nilsandrey's Weblog

Just another WordPress.com weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Shapes, Stencils, Drawings Templates, Tutorials, Tips & Developer Info for Microsoft Visio

Hannes's Virtual Earth

Tips & Tricks around Mapping and Cloud Computing

Pluralsight blog

be smart, be clear, be visual ...

%d bloggers like this: