简体   繁体   中英

Create attributes in visio drawing for export to svg

I'm developing a shemas in visio editor and later, after some changes, export them to svg format for view in browser.

I need a some method for identify my visio objects in svg file. This will be used in javascript for navigate over svg objects by link.

visio自动添加#group18992-10873

In the picture you can see, as Visio add the id to group or element. This id i can use in javascript, but this is added automatically, and i can't set it manually.

Is the method, to set these ids for my shapes in visio manually? For example group id of my wish is the: g#113-LI-601.

Not id, but i can set a title of an each group in visio drawing. After setting title of a group i can select them by this title in javascript.在此处输入图片说明

So, after setting name in visio, we can see in svg title tag inside group definition:

在此处输入图片说明

Check out my add-in: http://vispublish.azurewebsites.net/

This add-in should solve this more or less. You can specify javascript ID and CSS class for each Visio element basically in Visio. On exporting SVG, the add-in post-processes the file and fixes all ids in the exported SVG file with specified ones / default ones (visio may export duplicates), plus fixes some Visio SVG glitches, and adds shape-data. You can export a local SVG using it also.

在此处输入图片说明

Related discussion: http://visguy.com/vgforum/index.php?topic=61.msg25233#msg25233

Sample: http://vispublish.azurewebsites.net/Diagram/Show/6d6bb81b-0daa-46c2-862b-8127b7e3c700

There is a Add-in for that. You can see it here https://unmanagedvisio.com/products/svg-publish/

You can change the id from the setting option in home menu after installing this plugin. Home->Setting->Developer->client id

Make sure the only way to save your client id is by removing the focus from that text box or just simple hit "Tab" after you are done with your custom id (client id)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM