最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Create attributes in visio drawing for export to svg - Stack Overflow

programmeradmin2浏览0评论

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.

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.

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.

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.

Share Improve this question asked Mar 7, 2015 at 23:17 Sergio BelevskijSergio Belevskij 2,9872 gold badges27 silver badges30 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 1

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/

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./vgforum/index.php?topic=61.msg25233#msg25233

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

There is a Add-in for that. You can see it here https://unmanagedvisio./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)

发布评论

评论列表(0)

  1. 暂无评论