Export selected shapes to xml

Started by suhaspatil3007, November 24, 2011, 05:30:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

suhaspatil3007

I want to export selected shapes to xml.

e.g. i am thinking export shapesheet data to xml and recreate shape using that data.

please suggest guidelines on this

aledlund

Export to XML is an all or none scenario. Saving the document as a VXD file is the XML export process.
al

suhaspatil3007

thanks for quick reply.
yes i got your point but i need to export only selected shapes and use them as reusable in other files.

so for that  i found that shape can be exported to vector graphics  (.svg ) file which is xml file.
So now the question is how can i read this data and create shape using  VBA or c#.

any suggestions..

Nikolay

Check out my article:
http://unmanagedvisio.blogspot.com/2010/05/persisting-visio-shapes.html

It refers to binary data but maybe you will be able to persist Visio shape as XML in a similar way.

suhaspatil3007

i got my solution as
export -
Shape.Export ("c:\\testShape.svg")
import-
Visio.ActivePage.Import ("c:\\testShape.svg")

Nikolay


marko999

Actually, for export, this will export all shapes, not just that shape?
Anyone knows how to do export of just one shape to svg?

Thanks
Marko

Jumpy

Only a workarround: Copy shape to a blank page first.

Nikolay

Quote from: marko999 on August 08, 2012, 03:17:59 PM
Actually, for export, this will export all shapes, not just that shape?

Why? This will export only the shape for which you called the "Export" method.

marko999

#9
After some investigation around this issue and why I got confused - yes it exports only that shape, but only for simple shapes...if you export for example CFF Container(Swimlane), you will get all of contained shapes too...

Marko

aledlund

And given the changes in v2013 vs. the previous versions, the new XML schemas come into play.
al

Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 313 (show)
Files included: 34 - 1321KB. (show)
Memory used: 1176KB.
Tokens: post-login.
Cache hits: 11: 0.00247s for 26,573 bytes (show)
Cache misses: 1: (show)
Queries used: 14.

[Show Queries]