Visio加载项获取形状文本的字体大小

Visio加载项获取形状文本的字体大小

本文介绍了Visio加载项获取形状文本的字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定形状文本的字体大小.当我使用Visio作为用户时,我可以在Shape sheet(在Character->size下)看到此值但是,我无法理解如何以编程方式访问它以进行阅读.

I'm trying to determine the size of the font of a shape's text.When I use Visio as a user, I can see this value in the Shape sheet (under Character->size)However I'm not able to understand how to access it programatically, for reading.

我应该使用哪个section, Row and Cell索引?还是可以使用形状的Characters对象?

Which section, Row and Cell indexes should I use? Or maybe use the Characters object of the shape?

推荐答案

我通过以下方式成功获得了公式:

I was successful in obtaining the formula by:

string fontSize = shape.CellsSRC[(short) Visio.VisSectionIndices.visSectionCharacter,
      (short) Visio.VisRowIndices.visRowCharacter,
      (short) Visio.VisCellIndices.visCharacterSize].Formula;

或通过:

string fontSize = shape.CellsSRC[3,0,7].Formula;

实际上是一样的,只是可读性不高,或者是:

Which is practically the same, only not very readable, Or by:

string fontSize = shape.get_Cells("Char.Size").Formula;

这篇关于Visio加载项获取形状文本的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 09:01