문제

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.

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;

Or by:

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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top