Visio 2003: SaveAs 2002 API problem

M

Markus Breugst

Hello,

we are developing a .NET-based application that interacts with Visio via the
Visio Object Model. Currently, we try to move from Visio 2002 to Visio 2003.
In order to support both versions, we want to save Visio 2003 drawings in
the 2002 format. For this purpose, we use the Settings object:

_visioApp.Settings.DefaultSaveFormat =
VisDefaultSaveFormats.visDefaultSavePreviousBinary;

Unfortunately, Visio seems to ignore this and still saves its drawings in
the 2003 format, although the dialog "Tools -> Options -> Save" shows that
the 2002 format has been set as default format.

If I save a drawing "manually" with the SaveAs menu item and selecting the
old file format, it works.

Am I missing anything?

We are using Visio Professional 2003 (11.3216.5606).

Thanks a lot for any help.

Best regards,
Markus
 
M

Markus Breugst

Hi Mai-lan,

no, we are not using the drawing control. But perhaps I have to do something
else beside setting the default save format?

Best regards,
Markus
 
M

Michael

Hello Markus,

we have the same problem. The SaveAs works correct if you use the Visio UI
but fails using the API SaveAs method. As I have seen in other Visio
newsgroups this seems to be a bug in Visio.

Best regards,
Michael

Markus Breugst said:
Hi Mai-lan,

no, we are not using the drawing control. But perhaps I have to do something
else beside setting the default save format?

Best regards,
Markus
 
M

Markus Breugst

Hello Michael,

thanks for this information.

Currently, this problem stops us from supporting Visio 2003 in our
application. We think about using the VDX format as a workaround, but we are
not lucky with this solution, since Visio throws warnings if we try to open
a VDX file that has been created with a different Visio version. As far as I
know, Visio 2003 has some properties to switch off warnings that occur
during the 'save' and 'open' operations, but I don't know if Visio 2002 has
such a feature.

Best regards,
Markus



Michael said:
Hello Markus,

we have the same problem. The SaveAs works correct if you use the Visio UI
but fails using the API SaveAs method. As I have seen in other Visio
newsgroups this seems to be a bug in Visio.

Best regards,
Michael
 
M

Markus Breugst

Hello again,

I would like to know if the problem describes in this thread is known to
Microsoft and if there are any plans to fix it. If so, are there any time
estimations?

Thanks & regards,
Markus
 
M

Mark Nelson [MS]

Good question. I was not aware of this issue myself until I checked into it
further. There is a bug, but it is in the documentation, not the software.

DefaultSaveFormat is a UI setting that tells Visio what format to show in
the Save UI to the user. It does not actually impact Save or Save As
automation methods. In order to set the file format for save, use the
Version property. Here is a snippet from its documentation, which is
correct.

Setting the Version property of a document tells Visio which file format
version to save the document in the next time the document is saved. The
Visio type library declares constants for file format versions in
VisDocVersions.

Microsoft Office Visio 2003 can save a document in the following file format
versions.

Constant
Value
Description

visVersion60
&H60000
Visio version 2000 or 2002 document

visVersion110
&HB0000
Visio version 2003 document




Does this sufficiently resolve the issue?
 
M

Markus Breugst

Hello Mark,
Does this sufficiently resolve the issue?

it does perfectly resolve the issue. I tested it and it works. Thanks a
lot!!!

Best regards,
Markus
 

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