reading visio vsd file. Tricky problem

N

Nagaraj Chinni

Hi,
I have a very tricky problem to solve and it goes like this

1. I have a web application running in Internet Explorer
2. I will make a selection (like check box) and when I press the
button say "Select"
3. This selection should be updated into one of the icons properties
in a xyz.vsd file.

I don't know how to access the vsd file from a web browser!!. The vsd
file may or may not be open.

Web browser has the information regarding VSD file and the icon and
property of the icon to be modified.

Help is greatly appreciated. I need to finish this task ASAP.

Thanks in advance,
Nagaraj
 
D

David LACASSAGNE

I think there are 2 solutions:

1- You use Automation to open visio, your document, make your changes
and save them.

2- You don't use the vsd (native) file format for your Visio document
(because it is not documented), but the XML file format. And then with
classical file IO APIs or using a XML parser, you can perform your
modifications.

David.
 
N

Nagaraj Chinni

Hi David,
Thank you very much for your response. Based on your solutions,

1. Automation to open visio means, VB macro?.
2. I am using Visio 2000. How can I save a vsd document in XML format??.

-Nagaraj
 
V

Vinu

Hi,

While David responds to your query. You might find this useful. A simple VB macro like .
Public Sub LaunchVisio(
Dim appVisio As Visio.Applicatio
Dim docsObj As Visio.Document
Dim docObj As Visio.Documen
Dim stnObj As Visio.Documen
Dim mastObj As Visio.Maste
Dim pagsObj As Visio.Page
Dim pagObj As Visio.Pag
Dim shpObj As Visio.Shap

Set appVisio = CreateObject("Visio.application"
Set docsObj = appVisio.Document
Set docObj = docsObj.Add("Basic Diagram.vst"
Set pagsObj = appVisio.ActiveDocument.Page

Set pagObj = pagsObj.Item(1
Set stnObj = appVisio.Documents("Basic Shapes.vss"
Set mastObj = stnObj.Masters("Square"
Set shpObj = pagObj.Drop(mastObj, 5.1, 5.5
shpObj.Text = "Vinu

docObj.SaveAs "hello.vsd
MsgBox "Done Drawing!", , "wow.
appVisio.Qui

End Sub
 
D

David LACASSAGNE

1 - XML format : I think it has been introduced with Visio 2002...
You can try the Save As menu and see if file type .vdx is proposed.

2 - Automation:
Yes, you need VB macro. Look for CreateObject or GetObject in help.

David.
 
N

Nagaraj Chinni

Hi David and Vinu,
I'm able to write a macro as suggested by Vinu. But now the problem
is, that How can I invoke this vb macro from a JSP file. In other
words, how can I invoke a vb macro using a JAVA script. !!.
friends, you have any idea about that?.

I should have thought about this problem first rather than solving the
drawing update problem ! :(.


-Nagaraj
 

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