Visio导入SVG自定义形状数据
Visio import SVG custom shape data
我可以将 svg 文件导入 visio。我想将自定义数据附加到 SVG 文件中的元素,以便在导入时数据将显示在 visio 绘图中元素的形状数据中。我知道我可以事后将此数据分配给绘图,但我希望它与文件一起导入。
附加:如果我添加形状数据然后导出到 svg,数据将呈现
<v:custProps>
<v:cp v:nameU="this_is_data_name" v:lbl="this_is_data_label" v:type="0" v:langID="1033"
v:val="VT4(this is data value)"/>
</v:custProps>
这些 custProps 是我想要用 SVG 导入的数据。我可以导入这个 data/how 吗?
@ccprog 评论向我发送了正确的方向,但我还需要添加更多内容。所需的正确命名空间是
xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/"
此外,我需要将元素包装在 g 元素中。最终产品看起来像:
<g id="shape3" v:mID="3" v:groupContext="shape">
<v:custProps>
<v:cp v:nameU="Row_1" v:lbl="data1" v:type="0" v:langID="1033" v:val="VT4(data value 1)" />
<v:cp v:nameU="Row_2" v:lbl="data2" v:type="0" v:langID="1033" v:val="VT4(data value 2)" />
</v:custProps>
<rect x="595" y="40" fill="white" width="45" height="33" />
</g>
我可以将 svg 文件导入 visio。我想将自定义数据附加到 SVG 文件中的元素,以便在导入时数据将显示在 visio 绘图中元素的形状数据中。我知道我可以事后将此数据分配给绘图,但我希望它与文件一起导入。
附加:如果我添加形状数据然后导出到 svg,数据将呈现
<v:custProps>
<v:cp v:nameU="this_is_data_name" v:lbl="this_is_data_label" v:type="0" v:langID="1033"
v:val="VT4(this is data value)"/>
</v:custProps>
这些 custProps 是我想要用 SVG 导入的数据。我可以导入这个 data/how 吗?
@ccprog 评论向我发送了正确的方向,但我还需要添加更多内容。所需的正确命名空间是
xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/"
此外,我需要将元素包装在 g 元素中。最终产品看起来像:
<g id="shape3" v:mID="3" v:groupContext="shape">
<v:custProps>
<v:cp v:nameU="Row_1" v:lbl="data1" v:type="0" v:langID="1033" v:val="VT4(data value 1)" />
<v:cp v:nameU="Row_2" v:lbl="data2" v:type="0" v:langID="1033" v:val="VT4(data value 2)" />
</v:custProps>
<rect x="595" y="40" fill="white" width="45" height="33" />
</g>