【发布时间】:2015-07-20 17:48:08
【问题描述】:
我正在使用带有 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";
【问题讨论】: