usability problem

I

Ivan A. Vasilyev

Hello

I use Visio 2007 and some strange problem arised recently. When I edit text
in any shape in any type of diagram some keyboard keys work not as it is
expected. In particular, LEFT arrow key moves cursor to the RIGTH, and RIGTH
arrow key moves cursor to the LEFT. More over, END key moves cursor to the
begining of a text, and HOME key moves cursor (as you already guessed :) )
to the end of a text.

It is VERY annoying. Any ideas how to fix it?

TIA.
 
J

John Goldsmith

Hello Ivan,

Sounds like you've somehow changed to a right-to-left language such as
Hebrew or Arabic. You can select the text, for existing text, and
right-click and select Format text..., then change the language to English
(US) or another left-to-right language. However for new text / documents
you might want to check the selected keyboard language under Control Panel /
Regional and Language Options / Languages.

For more information on right-to-left languages in Visio, check out this
link:

http://office.microsoft.com/en-us/visio/HP010500021033.aspx

Hope that helps.

Best regards

John


John Goldsmith
www.visualSignals.co.uk
 
I

Ivan A. Vasilyev

Hello, John.

Thanks for the response.
I've checked my Regional Options and it is correct. "Text format" command
also shows correct settings.
It seems to be some other problem. May be related but other...
Unfortunately, I can't remember when this problem arised. So I can't even
imagine what caused the problem.
May be you have any other ideas?

TIA
 
M

Mark Nelson [MS]

In Visio there is a paragraph direction button on the toolbar that appears
if you have any Right-to-Left languages installed on your system. What you
describe sounds like the button is set to Right-to-Left paragraphs.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
I

Ivan A. Vasilyev

Hello, Mark.

The buttons you mentioned are only visible during toolbar "customization
mode". So i conclude i have no any Right-to-Left languages installed.
Actually, i have two input languages installed: English (US) and Russian.
None of them are of right-to-left type.
It seems to be something out of the scope of designed behavior. But i still
hope to fix it )
TIA
 
D

DiRTy GaRRy

Do you found any solution for your problem? I have some problem in
similar enviroment: Windows Server 2003 R2 SP2, Visio 2007 with
Russian MUI, Russian and English input laguages, right-to-left
langauges support installed.
 
B

Barb Way

I found that this issue has been logged, but no fix is currently available
for it. The problem occurs because of a flag setting which incorrectly
identifies the stencils/templates/shapes as being RTL (Right to Left) for
language navigation. This occurs in both the original release and in SP1,
unfortunately. I'm not aware of work arounds right now.

Barb Way
Product Support - Visio
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: DiRTy GaRRy <[email protected]>
Newsgroups: microsoft.public.visio.troubleshoot
Subject: Re: usability problem
Date: Thu, 15 Nov 2007 23:14:41 -0800 (PST)
Organization: http://groups.google.com
Lines: 4
Message-ID:
<d6c154eb-de48-4e75-b3b6-2bae2973a052@n20g2000hsh.googlegroups.com>
References: <#S9#[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
NNTP-Posting-Host: 80.250.189.17
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1195197281 32453 127.0.0.1 (16 Nov 2007
07:14:41 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: Fri, 16 Nov 2007 07:14:41 +0000 (UTC)
Complaints-To: (e-mail address removed)
Injection-Info: n20g2000hsh.googlegroups.com; posting-host=80.250.189.17;
posting-account=mfVgtQoAAAAJ9cKNPwd99712ZV2YhgPw
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET
CLR
1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727; .NET CLR
3.0.04506.30),gzip(gfe),gzip(gfe)
Content-Disposition: inline
Path:
TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTFEEDS01.phx.gbl!TK2MSFTFE
EDS02.phx.gbl!tornado.fastwebnet.it!tiscali!newsfeed1.ip.tiscali.net!proxad.
net!feeder1-2.proxad.net!64.233.178.134.MISMATCH!postnews.google.com!n20g200
0hsh.googlegroups.com!not-for-mail
Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.visio.troubleshoot:200
X-Tomcat-NG: microsoft.public.visio.troubleshoot

Do you found any solution for your problem? I have some problem in
similar enviroment: Windows Server 2003 R2 SP2, Visio 2007 with
Russian MUI, Russian and English input laguages, right-to-left
langauges support installed.
 
A

Apc

Hello. This is exactly what's giong on: if I just use "Text Tool" - the text
is left-to-right, then I bring a shape from a stencil to the scene - and it's
Right-to-Left.

Is there any way to create a VBscript that will run over all the stencils
and change the flag?
Can you provide more info about this very flag as MSDN has nothing on it?
It the worst case, I'd have to HEX-Edit the files flipping bits, because
this issue is sooooo irritating :((
 
B

Barb Way

You can definitely use a macro to update the stencils that you use
regularly.

Here's a sample of a (very simplified) code snip that shows the basic
concept:
** some shape called 'shape1' is selected ***
If (shape1.CellsSRC(visSectionParagraph, 0, visFlags).FormulaU <> "0") Then
' Debug.Print " Changed"
shape1.CellsSRC(visSectionParagraph, 0, visFlags).FormulaU = "0"
End If

Of course, you would need to wrap that into code that 'walked' a drawing or
stencil, selecting shapes / masters and changing the flag.

FYI - I believe that there is a request in process for an article on this,
and I will post the information here when I have more details on that.

Barb Way
Product Support - Visio
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Apc

Thanks Barb, your code was handy.

Since I posess a strange illness that prevents me from writing in VB i asked
my friend to help me. And with his programming talent and my debugging we
(mostly, he) created this (credits to LastSoul, Ukraine):

===[CUT]===
Option Explicit
Sub fixVisFlags()
Dim i As Integer
Dim vsoDocument As Visio.Document
Dim vsoPages As Visio.Pages
Dim vsoPage As Visio.Page

Set vsoPages = ActiveDocument.Pages
Debug.Print "Document: "; ActiveDocument.Name
For i = 1 To vsoPages.Count
Set vsoPage = vsoPages.Item(i)
Debug.Print " Page: "; vsoPage.Name
fixShapes vsoPage.Shapes
Next i
End Sub
Sub fixShapes(vsoShapes As Visio.Shapes)
Dim j As Integer
Dim vsoShape As Visio.shape
For j = 1 To vsoShapes.Count
Set vsoShape = vsoShapes.Item(j)
Debug.Print " Shape: "; vsoShape.Name
If (vsoShape.CellsSRC(visSectionParagraph, 0, visFlags).FormulaU <>
"0") Then
Debug.Print " Fixed:"; vsoShape.Name
vsoShape.CellsSRC(visSectionParagraph, 0, visFlags).FormulaU = "0"
End If
If vsoShape.Shapes.Count > 0 Then
fixShapes vsoShape.Shapes
End If
Next j
End Sub
===[/CUT]===

Just create a macro with any name, wipe it's empty template and insert this
code.
You'll get a fixVisFlags macro that will fix most of problems in already
created document.

I found one rare occasion that we'll investigate further, it occures when
you alredy have a r-to-l shape with (label) that has several differently
formatted text blocks. For some reason only the first one is fixed - it seems
we'd have to add another level of recursion.

Thus, I have some questions:
1. It there a way in Visio DOM to just plainly address all text blocks in
the document in one huge 1-dimensional array as it is possible with elements
in HTML DOM?
2. What should I do to enable this macro to run on stencils? Which objects
should I address and do I have to have the stencils opened?
 
B

Barb Way

1. It there a way in Visio DOM to just plainly address all text blocks in
the document in one huge 1-dimensional array as it is possible with
elements
in HTML DOM?

2. What should I do to enable this macro to run on stencils? Which objects
should I address and do I have to have the stencils opened?

There isn't a 'do this for all text' kind of method that I'm aware of in
the Visio object model.
Assuming you mean groups, you would generally expect to recursively run
through all objects .

Alternatively, you could save a drawing or a stencil (or a template) as an
XML version file, and do a search and replace:
Find: <Flags>0</Flags>
Replace with: <Flags>1</Flags>
...for instance.
Although that won't get the items which have a value which they inherited.
Might be better to search just for "0</Flags>" and replace with "1</Flags>"
(without any of the quotes, of course)


Barb Way
Product Support - Visio
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
 
V

VIFR

Hello!
Is there any patch to fix the described issue above? I have the same version
of Visio and the same annoying bug in it :
"LEFT arrow key moves cursor to the RIGTH, and RIGTH
arrow key moves cursor to the LEFT. More over, END key moves cursor to the
begining of a text, and HOME key moves cursor (as you already guessed :) )
to the end of a text"
I have to work with Visio a lot but the solution mentioned here is not
helpful for me, I am not aware how to use it. Please help.
Thanks in advance!
 
B

Barb Way

Unfortunately there is no fix for this yet. It is planned to address the
problem of the built in shapes in the next service pack.

For now, you will need to manually update the shapes / masters / styles to
'fix' a drawing.
Here is an expanded code sample that should be able to update the Paragraph
flag in a drawing (all shapes, all masters, all pages), but you will have
to run the code for each drawing / template that you create. As always -
this is provided as a sample only...

SAMPLE ONLY =============================================
****************************************************************************
**********

Option Explicit

Sub MakeAllShapesLTRParagraphDirection()
Dim doc As Document
Dim stylesColl As Styles
Dim style1 As Style
Dim mastersColl As Masters
Dim master1 As Master
Dim masterCopy As Master
Dim shapesColl As Shapes
Dim shape1 As Shape
Dim pagesColl As Pages
Dim page1 As Page

Set doc = ActiveDocument
Set stylesColl = doc.Styles
For Each style1 In stylesColl
Call MakeStyleLTR(style1)
Next

Set mastersColl = doc.Masters
For Each master1 In mastersColl
' Debug.Print "Master: ", master1.NameU
Set masterCopy = master1.Open
Set shapesColl = masterCopy.Shapes
For Each shape1 In shapesColl
Call MakeShapeLTR(shape1)
Next
masterCopy.Close
Next

Set pagesColl = doc.Pages
For Each page1 In pagesColl
' Debug.Print "Page: ", page1.NameU
Set shapesColl = page1.Shapes
For Each shape1 In shapesColl
Call MakeShapeLTR(shape1)
Next
Next

End Sub

Sub MakeShapeLTR(shape1 As Shape)
Dim shapesColl As Shapes
Dim shape2 As Shape

On Error GoTo continue ' If cell is guarded then ignore

'Debug.Print "Shape: ", shape1.NameU
If (shape1.CellsSRC(visSectionParagraph, 0, visFlags).FormulaU <> "0") Then
' Debug.Print " Changed"
shape1.CellsSRC(visSectionParagraph, 0, visFlags).FormulaU = "0"
End If

continue:

Set shapesColl = shape1.Shapes
For Each shape2 In shapesColl
Call MakeShapeLTR(shape2)
Next

End Sub

Sub MakeStyleLTR(style1 As Style)
On Error GoTo continue ' If cell is guarded then ignore

'Debug.Print "Style: ", style1.NameU
If (style1.CellsSRC(visSectionParagraph, 0, visFlags).FormulaU <> "0") Then
' Debug.Print " Changed"
style1.CellsSRC(visSectionParagraph, 0, visFlags).FormulaU = "0"
End If

continue:

End Sub

****************************************************************************
**********
SAMPLE ONLY =============================================

Hope that helps.

Barb Way
Product Support - Visio
Microsoft Corporation
[This posting is provided "As Is" with no warranties, and confers no
rights.]
--------------------
From: <[email protected]>
Subject: Re: usability problem
Date: Mon, 26 May 2008 23:30:01 -0700

Hello!
Is there any patch to fix the described issue above? I have the same
version
of Visio and the same annoying bug in it :
"LEFT arrow key moves cursor to the RIGTH, and RIGTH
arrow key moves cursor to the LEFT. More over, END key moves cursor to the
begining of a text, and HOME key moves cursor (as you already guessed :) )
to the end of a text"
I have to work with Visio a lot but the solution mentioned here is not
helpful for me, I am not aware how to use it. Please help.
Thanks in advance!
 

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