Batching ideas

J

JP Spane

Hello all,

I have written a Visio VSL plug-in in C++ that operates on a Visio Drawing
and exports the data in that drawing to custom XML format. Everything works
great. The problem I have now is I want to batch many visio drawings and
invoke the custom export VSL method on them. There are too many to do this
manually. How does one use visio in a command line mode to facilitate this
type of batching? I am thinking I have to write a stand alone application
that links to Visio somehow.

Thank for any ideas,

JP
 
P

Paul Herber

Hello all,

I have written a Visio VSL plug-in in C++ that operates on a Visio Drawing
and exports the data in that drawing to custom XML format. Everything works
great. The problem I have now is I want to batch many visio drawings and
invoke the custom export VSL method on them. There are too many to do this
manually. How does one use visio in a command line mode to facilitate this
type of batching? I am thinking I have to write a stand alone application
that links to Visio somehow.

Can you not just iterate over the documents collection?
 
A

AlEdlund

there's an example of how visio can operate with a command line
instantiation in the visio sdk. I have used it to open a template (thus
giving me access to underlying code) and then execute an integrated batch
job.
al
 
N

Nikolay Belyh

Hello all,

I have written a Visio VSL plug-in in C++ that operates on a Visio Drawing
and exports the data in that drawing to custom XML format. Everything works
great. The problem I have now is I want to batch many visio drawings and
invoke the custom export VSL method on them. There are too many to do this
manually. How does one use visio in a command line mode to facilitate this
type of batching? I am thinking I have to write a stand alone application
that links to Visio somehow.

Thank for any ideas,

JP

Probably you shall just go with somoe sort of script?
A VBScript file, for example.
Something like this:

--- batch.vbs ----

Set app = CreateObject("Visio.InvisibleApp")
Set fso = CreateObject("Scripting.FileSystemObject")

Set folder = fso.GetFolder("C:\MyFolderWithDiagrams")
For Each file in folder.Files
Set doc = app.Documents.Open file.Path
app.Addons.Item("MYADDONNAME").Run "MY ADDON COMMAND LINE"
doc.Close
Next

app.Quit

------------------
 

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