2

I wasn't able to find anything useful about how to write a visio file with java, and probably looked through every article on the web. If found a lot of stuff about doing it with c#, vb, and other stuff but couldn't find what I need.

I also found this, but I am not sure if this (reverse engineering) could do what I need >>How to generate MS Visio diagram automatically?<<. Because I really want to create a vsd file with my java application write a lot of data into it (from an xml file for example) and open it afterwards with visio to check and correct that data.

It took me a while to find this

http://www.java2s.com/Open-Source/Java/Development/jacob-1.15/com/jacob/samples/visio/Catalogvisio.htm << which at least allowed me to open a visio file.

But I still need to know how to write into that file and save it afterwards.

So in short, my acutal attempt is to use jacob, but I don't know how to do stuff like "add block at position x,y" with that com bridge. Is there a docu for that stuff?

any help would be appreciated

thanks

Community
  • 1
  • 1
Snow
  • 29
  • 2
  • 1
    try searching for "java jacob visio" -- there do seem to be some examples on the web. – arcy Jul 23 '13 at 16:12
  • there are some examples, but they only show how to get a connection to visio and open it with a file. I haven't found how to edit a visio file through that connection by code. Have I missed something you found? I guess I'm missing the right dispatch command. for example instead of "Export" I'd need something like add rectangle... ActiveXComponent document = new ActiveXComponent(getProperty("ActivePage").toDispatch()); Variant[] args = new Variant[1]; args[0] = new Variant(f.getPath()); document.invoke("Export", args); – Snow Jul 23 '13 at 19:55

0 Answers0