Table of contents
TOC
折叠目录
展开目录

Document.DiagramServicesEnabled 属性 (Visio)Document.DiagramServicesEnabled Property (Visio)

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

确定为文档启用了哪些图表服务(如果有)。可读/写。Determines which, if any, diagram services are enabled for the document. Read/write.

语法Syntax

表达式DiagramServicesEnabledexpression . DiagramServicesEnabled

表达式_该表达式返回一个文档对象。_expression An expression that returns a Document object.

返回值Return Value

LongLong

注解Remarks

Visio 将有几个关系图行为,包括结构化图表行为和自动调整大小行为。结构化图表行为定义当创建容器成员关系和标注的关联。Visio 将自动调整大小以适应其内容中更改绘图页时,将定义自动调整大小行为。Visio has several diagram behaviors, including structured-diagram behaviors and AutoSize behaviors. Structured-diagram behaviors define when container-membership relationships and callout associations are created. AutoSize behaviors define when Visio automatically resizes the drawing page to adjust to changes in its contents.

在解决方案中,您可以利用这些新的关系图行为使用DiagramServicesEnabled属性来启用聚合这些行为的服务。解决方案修改该关系图时,Visio 将调用与当前已启用的任何的服务关联的图中行为。In your solution, you can take advantage of these new diagram behaviors by using the DiagramServicesEnabled property to enable the services that aggregate these behaviors. When your solution modifies the diagram, Visio invokes the diagram behaviors associated with any of the services that are currently enabled.

DiagramServicesEnabled属性设置的值必须是 1 或以下为VisDiagramServices枚举常量的按位组合。The value of the DiagramServicesEnabled property setting must be one or a bitwise combination of the following constants from the VisDiagramServices enumeration.

常量ConstantValue说明Description
visServiceNonevisServiceNone00无图表服务。No diagram services.
visServiceAllvisServiceAll-1-1所有图表服务。All diagram services.
visServiceAutoSizePagevisServiceAutoSizePage11自动调整大小(自动调整页面大小)行为。AutoSize (automatic page-sizing) behaviors.
visServiceStructureBasicvisServiceStructureBasic22保持现有关系但不创建新关系的结构化图表行为。Structured-diagram behaviors that maintain existing relationships but do not create new relationships.
visServiceStructureFullvisServiceStructureFull44与用户界面 (UI) 中所有行为相匹配的结构化图表行为。Structured-diagram behaviors that match all those in the user interface (UI).
visServiceVersion140visServiceVersion14077在 Visio 中存在的所有关系图服务。All diagram services that exist in Visio.
visServiceVersion150visServiceVersion15088在 Visio 中存在的所有关系图服务。All diagram services that exist in Visio.

如果您组合visServiceStructureBasicvisServiceStructureFull ,后者优先于前者。但是,可以将visServiceAutoSizePagevisServiceStructureBasic (3) 或visServiceStructureFull (5) 相结合,并将这些值分配给属性。If you combine visServiceStructureBasic and visServiceStructureFull , the latter overrides the former. However, you can combine visServiceAutoSizePage with either visServiceStructureBasic (3) or visServiceStructureFull (5) and assign either of those values to the property.

图表服务仅适用于通过自动化方式以编程方式处理 Visio 的解决方案。它们对于在 UI 中公开的行为没有任何影响。禁用这些行为的 UI 设置对以编程方式触发的行为没有任何影响。Diagram services apply only to solutions that manipulate Visio programmatically (by Automation). They do not have any effect on the behaviors that are exposed in the UI. UI settings that disable these behaviors have no effect on behaviors that are triggered programmatically.

默认情况下,会对文档禁用图表服务。在解决方案修改图表之前,您必须启用要使用的所有服务。图表服务设置不具有持久性,不能从一个 Visio 会话延续到下一个会话。By default, diagram services are disabled for a document. You must enable any services you want to take advantage of before your solution modifies the diagram. Diagram service settings are not persisted from one session of Visio to the next.

© 2018 Microsoft