我正在使用带有c#的axdrawingcontrol来打开Visio。我需要将默认绘图单位(以英寸为单位)更改为点。标尺和网格已经在点上,但如果我使用例如ActivePage.DrawRectangle(1, 5, 5, 1);
方法,矩形将以英寸绘制。
我尝试使用代码来更改默认单位,但它没有任何效果。我的错误在哪里?
AxDrawingControl _drawingControl;
_drawingControl.Document.Application.ActivePage.PageSheet.CellsSRC[
(short)VisSectionIndices.visSectionObject ,
(short)VisRowIndices.visRowPage,
(short)VisCellIndices.visPageScale
].FormulaU ="1pt";
_drawingControl.Document.Application.ActivePage.PageSheet.CellsSRC[
(short)VisSectionIndices.visSectionObject,
(short)VisRowIndices.visRowPage,
(short)VisCellIndices.visPageDrawingScale
].FormulaU = "1pt";