SmartTags in Visio 2007

N

nbelyh

When you open a diagram in Visio 2007,
All smarttags are invisible, even those for wich displayMode is set
to "show always". After you select any shape on the diagram,
all smarttags for which displayMode is set to "showAlways"
become visible.

Is this a feature or a bug?
In Visio 2003 all "showAlways" smarttags were
shown immediately. If this is a feature then how do
I force smarttags to be shown when opening a diagram
(diagram is opened using automation)?
 
N

nbelyh

No answer so far...
Nobody knows or nobody cares? :)

This issue is quite important to us, becuase we use smart tags to
*mark* shapes.
Now, when one open a diagram in Visio 2007, and there are no smart tags
on it,
he can erroneously think that none of shapes are marked...

"Always visible" smart tags worked fine in previous Visio version.
Is this an intended change in behavior (that will be kept) or
accidental change (that will be fixed)?
 
S

Senaj Lelic [DE MVP Visio]

Sorry i cannot confirm this.
i just created a diagram set the SmartTag display mode to 2 and i ALWAYS see
the SmartTag
 
N

nbelyh

Sorry i cannot confirm this.
i just created a diagram set the SmartTag display mode to 2 and i ALWAYS see
the SmartTag

This happens when you open drawing _programmatically_
If you open the drawing by hand (menu), everything is fine.

The steps to reproduce that:
1. Create a drawing with smart tag, display mode = 2 (show always)
2. Save this drawing, say "C:\MyDocument.vsd".
3. Close the drawing.
2. Switch to VBA, and type:
Application.Documents.Open "C:\MyDocument.vsd"
Switch back to Visio. The document has been opened without smart tags.
 
N

Nikolay Belyh

Just to let the community know the workaround for this problem we encountered
a while ago.

The problem:
In Visio 2007, SmartTags that are marked as "always visible",
are not always shown when diagram is opened programmatically.

The workaround (by Senaj Lelic):
After opening diagram, call the following function to force the redraw of
the smart tags:

Sub correctView()
Dim a As Double
Dim b As Double
Dim c As Double
Dim d As Double
Call ActiveWindow.GetViewRect(a, b, c, d)
Call ActiveWindow.SetViewRect(a, b, c, d + 0.01)
Call ActiveWindow.SetViewRect(a, b, c, d)
End Sub

For this code to work you might need to call it from either "visio idle" or
"no event pending" handler.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top