Document.DiagramServicesEnabled property (Visio)
Determines which, if any, diagram services are enabled for the document. Read/write.
Syntax
expression.DiagramServicesEnabled
expression An expression that returns a Document object.
Return value
Long
Remarks
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.
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.
The value of the DiagramServicesEnabled property setting must be one or a bitwise combination of the following constants from the VisDiagramServices enumeration.
Constant | Value | Description |
---|---|---|
visServiceNone | 0 | No diagram services. |
visServiceAll | -1 | All diagram services. |
visServiceAutoSizePage | 1 | AutoSize (automatic page-sizing) behaviors. |
visServiceStructureBasic | 2 | Structured-diagram behaviors that maintain existing relationships but don't create new relationships. |
visServiceStructureFull | 4 | Structured-diagram behaviors that match all those in the user interface (UI). |
visServiceVersion140 | 7 | All diagram services that exist in Visio. |
visServiceVersion150 | 8 | All diagram services that exist in Visio. |
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.
Diagram services apply only to solutions that manipulate Visio programmatically (by Automation). They don't 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.
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.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기