【发布时间】:2022-11-12 03:52:47
【问题描述】:
我正在使用 Visio Professional 2021 和 VS 2019 进行开发。
我想按照下面的屏幕截图将数据图形添加到我在 Visio 中添加的形状中。你能在 C# 中提出一些可能性吗?
下面是我尝试过的代码
short customProps = (short)VisSectionIndices.visSectionProp;
short rowNumber = shape.AddRow(customProps, (short)VisRowIndices.visRowLast, (short)VisRowTags.visTagDefault);
shape.CellsSRC[customProps, rowNumber, (short)VisCellIndices.visCustPropsLabel].FormulaU = "\"" + PropertyName + "\"";
shape.CellsSRC[customProps, rowNumber, (short)VisCellIndices.visCustPropsValue].FormulaU = "\"" + propertyValue + "\"";
但我想按照显示的图像在每个形状上添加数据图形。
【问题讨论】:
-
希望this article 和 VBA 代码可以帮助
-
我已经浏览了这些文件,但我的疑问是如何使用 c#/vba 代码创建数据图形项?
-
你读过文章Assembling data graphics programmatically了吗?你也可以下载SDK,在那里你可以找到模块cs_CustomiseDataGraphics