Table of contents

InvisibleApp.DefaultTextUnits 属性 (Visio)InvisibleApp.DefaultTextUnits Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

确定文本度量的默认度量单位。读/写。Determines the default unit of measure for quantities that represent text metrics. Read/write.


表达式DefaultTextUnitsexpression . DefaultTextUnits

表达式_一个表示InvisibleApp对象的变量。_expression A variable that represents an InvisibleApp object.

返回值Return Value



DefaultTextUnits属性对应于在下的文本框显示高级选项卡上的Visio 选项对话框中所示的值 (单击文件选项卡,然后单击选项)。The DefaultTextUnits property corresponds to the value shown in the Text box under Display on the Advanced tab of the Visio Options dialog box (click the File tab, and then click Options).

返回值将包含在 Microsoft Visio 类型库声明的VisUnitCodes的值之一。The return value contains one of the values of VisUnitCodes , which are declared in the Microsoft Visio type library.

可以指定DefaultTextUnits的值为整数 ( VisUnitCodes的成员) 或一个字符串值,例如"点"。如果字符串无效或者单位代码不合适 (非文本),则会产生错误。You can specify the value of DefaultTextUnits as an integer (a member of VisUnitCodes ) or a string value such as "pt". If the string is invalid or the unit code is inappropriate (non-textual), an error is generated.

有关有效单位字符串以及对应的自动化常量 (整型值) 的完整列表,请参阅关于度量单位For a complete list of valid unit strings along with corresponding Automation constants (integer values), see About Units of Measure.

包含特定度量单位的单元格公式采用与默认文本单位设置无关的单位显示。但是,许多单元格公式使用隐式单位语法并采用默认单位显示。Cell formulas that contain a specific unit of measure are displayed in those units regardless of the default text units setting. Many cell formulas, however, use implicit unit syntax and are displayed in default units.

程序可以创建其公式采用默认单位显示的单元格的Formula属性设置为采用隐式单位语法的字符串的单元格。例如,公式"= 8 [pt,T]"显示为"8 磅"如果DefaultTextUnits属性visCicerosDefaultTextUnits属性将为visPoints和"0.6272"。A program can create a cell whose formula is displayed in default units by setting the cell's Formula property to a string in implicit unit syntax. For example, the formula "=8[pt,T]" is displayed as "8 pt" if the DefaultTextUnits property is visPoints and "0.6272" if the DefaultTextUnits property is visCiceros .

另外,程序可以使用以下语句将单元格的结果设置为默认文本单位:Alternatively, a program can use the following statement to set the cell's result to default text units:

vsoCell.Result(visTextUnits) = 12

在这种情况下,文本是 12 磅,如果DefaultTextUnits属性为visPoints和 12 ciceros visCicerosDefaultTextUnits属性时。In this case, the text is 12 points if the DefaultTextUnits property is visPoints and 12 ciceros if the DefaultTextUnits property is visCiceros .

有关隐式度量单位的详细信息,请参阅关于度量单位For details about implicit units of measure, see About Units of Measure.

© 2018 Microsoft