Visio version='10.0' "The selected VDX file is invalid"

Started by javadude, October 09, 2014, 10:07:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

javadude

Hi All,
I'm new to Visio and I created a OrgChart using Visio version='10.0' template; I analyzed the structure and the syntax and all is OK; I compared it with other similar succesful VDX files and I can not see any difference that can explain why I can not open the related visio file created by me; more precise the error that I get (even following the general visio troubleshooting tips) is just a simple "The selected VDX file is invalid" that's it and just another line "Context: <VisioDocument><Pages><Page><Shapes><Shape><Prop>" ; I've configured Visio for debug mode but that is the only info I get about the error when trying to open the file which is not very helpful. Because I checked open and closing tags, general visio structure, template etc and all seems fine to me. I also looked for hidden characters like CR (carriage return \r ) or LF (line feed or new line if you want \n ) and all looks good similar with the successful VDX files that I can open; I thought that maybe it needs a final CR (since every visio line ends with \r\n ), so I included but makes no difference. Can someone point how we can debug visio charts that we create? What is the right procedure to find more info about the issues and errors when creating visio charts? I've attached a general org chart created by me.  - there is no XML or VISIO structure issue so I removed the attachment.

aledlund

According to the trapped error

"The 'PageProps' start tag on line 1678 position 2 does not match the end tag of 'Masters'. Line 1680, position 3."

hth,

al edlund

javadude

#2
Hello and thanks for reply but exactly as I mentioned right there in a comment inserted by me:
<!-- ... Here I had to cut the file to fit into the acceptable attachment file size but all this page props are complete and correct rest assured , javadude -->
That portion of the file I excluded because of the size considerations rule (500 KB) when you upload an attachment on the forum.
Now I will attach exactly that portion (the missing content between the </Masters> tag) so all the file will be there for viewing and you will observe that all the open tags are matching the closing tags as it should... If you have any other idea please let me know. - there is no XML or VISIO structure issue so I removed the attachment.

Paul Herber

Rather than post a huge pile of XML how about debug it as follows:
1. Create the XML for just a blank page first of all.
2. Add one item at a time
See at what point it goes wrong. That's where your problem is.

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

aledlund

I'd suggest you start with
http://www.microsoft.com/en-us/download/details.aspx?id=7973
xml notepad 2007.
Your first file had an xml error in it, your second file was not a complete visio file. If you compare the two you will see that your second file does not have a 'document' section in it.

al Edlund

aledlund

paul,
I'd suggest that even though he is attempting to create a v2002 orgchart, that this be moved to a development group since it is really an appdev with xml set of issues.

al

javadude

There are no XML issues here! Maybe I expressed myself bad, but I think I was pretty clear, I've split the file in 2 because of attachment size restrictions that is all. If you take second attachment and insert it (replace the comment line from first attachment i.e. <!-- ... Here I had to cut the file to fit into the acceptable attachment file size but all this page props are complete and correct rest assured , javadude -->) then you will have my whole visio file that I generated.
Moreover I validated the file from XML point of view and this is correct. There is something else here related to Visio that is a issue and is very hard to debug it. I will try what Peter suggested but it will be pretty similar just without data in it...

javadude

And I have a v2006 Visio template (version 10.0) that I use in the code and not v2002; I've installed Visio 2007 (version 12.0). There is no problem with that, usually the VDX file is converted from 10.0 to 12.0 upon opening it.

aledlund

as an fyi version "10" is the visio 2002 schema. The schema was updated for v2007 and again for v2010 (added datarecordsets in 2007 and drawing validation in 2010).

The shortest path for testing xml viability is to drop it into the 'xml notebook' which does an xml validation, it does not test for whether the  file is complete enough for the visio object model, only visio can do that. My first check of your file was to put it into the xmlVisio tool, which like the xml notebook errored out with the incomplete tags error message. My tool allows me to also check the visio objects, it goes beyond just xml checks.

al Edlund


javadude

Thank you for that info, I had something else in the documentation I received.
Now did you put together the 2 attachements parts in one single visio file (take second part and replace the comment line from first part) prior to test it in your tool? If not ofcourse there are missing tags and content... otherways it should be good.
I will create first a blank document and then try your tool too.
Thanks in advance

PS: where can I take a look at a basic org chart tamplate for the Visio 2007 ? in case I have to update the template I use...

aledlund

The template in v2007 is probably the same as the one in v2002. If you would like you can send my a complete test file over at edlund60014 to be found on yahoo dot com.

al

javadude

I started with a blank file as suggested and is all correct. I added one position and debugged it and realized the following:
saving this exact same file with a different editor (I switch back and forth between Notepad++ and UltraEdit32) results in a Visio file that opens just fine; comparing the 2 files I came upon the following conclusion: there is only one difference between the files (using WinMerge) and it's related to the encoding for the French characters:
- file that gives the "VDX file is invalid" error has this in the text for the related position   "SYSTÈMES"
- file that was re-saved with UltraEdit32 and opens just fine has this in the text for the related position   "SYSTǍES"
I just have to find out what encoding was used by default in UltraEdit32 = because that was succesful.

When using Notepad++ encoding in UTF-8 without BOM to visualize the file it gives:
- file that gives the "VDX file is invalid" error has this in the text for the related position   "SYSTɍES"
- file that was re-saved with UltraEdit32 and opens just fine has this in the text for the related position   "SYSTǍES" ???

Can someone shed a light about how we can use special characters sets like the French accents that require 8 bit character encoding set (so their size is a bit bigger then regular ASCII charcter set) in Visio diagrams?

I looked at other previous VDX files and none are displaying the French characters as it should; for example previously I had "SYST?MES" for the word "SYSTÈMES" displayed in the related Visio diagram. I've changed the title/subject of this thread accordingly.

javadude

#12
OK, the default on my UltraEdit 32 is ISO 1252 (Ansi - Latin I)
So this means that Visio can interpret/process only this ISO 1252 encoding ?
What about UTF-8 encoding ?

javadude

In my visio template I used:           encoding="UTF-8"
Using this encoding I generated the visio file and saved it locally to my system; in this case the file can not be open and I run tno that general "VDX file is invalid" as explained above.
If I convert this file (saved locally to my system) to ANSI then all is fine I can open the generated visio file created in previous step; but this messes up the French characters.
I assume I can change the encoding in the template, then the file gets open fine, but the content for the French characters is not correct...

Any idea ?

Paul Herber

Create an ordinary diagram by the normal method, put some French characters in a shape and save as XML, then have a look at the file to see the coding.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/