New Members and Constants

Visio Automation Reference

New Members

The following properties, methods, and events have been added to existing objects in Microsoft Office Visio 2007.

Application

Properties Description
Assistance Gets a reference to the Microsoft Office (MSO) IAssistance object, which provides a means for developers to create a customized help experience for users within Microsoft Office. Read-only.
DataFeaturesEnabled Gets whether the data features in Microsoft Office Visio 2007 are enabled for the current instance of Visio. Read-only.
DefaultRectangleDataObject Returns an IDataObject interface that represents the Rectangle tool used in the Microsoft Office Visio user interface. Read-only.
LanguageSettings Returns a reference to the Microsoft Office (MSO) LanguageSettings interface. Read-only.
MyShapesPath Gets or sets where Microsoft Office Visio looks for the My Shapes folder on the user's hard disk. Read/write.
Events Description
AfterRemoveHiddenInformation Occurs when hidden information is removed from the document.
AfterResumeEvents Occurs after firing of events is resumed.
BeforeDataRecordsetDelete Occurs before a DataRecordset object is deleted from the DataRecordsets collection.
BeforeSuspendEvents Occurs before firing of events is suspended.
DataRecordsetAdded Occurs when a DataRecordset object is added to a DataRecordsets collection.
DataRecordsetChanged Occurs when a data recordset changes as a result of being refreshed.
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
QueryCancelSuspendEvents Occurs before the application suspends events in response to client code. If any event handler returns True, the operation is canceled.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.
ShapeLinkAdded Occurs after a shape is linked to a data row.
ShapeLinkDeleted Occurs after the link between a shape and a data row is deleted.
SuspendEventsCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelSuspendEvents event.

ApplicationSettings

Properties Description
ApplyThemesOnShapeAdd Gets or sets whether to apply themes to new shapes when they are added to the drawing page. Read/write.
BIDITextUI Gets the current setting for display of right-to-left languages. Read-only.
EnableAutoConnect Determines whether the AutoConnect feature is enabled in the Microsoft Office Visio user interface (UI). Read/write.
KashidaTextUI Gets the current setting for display of Kashida text-justification in certain cursive languages. Read-only.
SATextUI Gets the current setting for display of South Asian languages. Read-only.
ShowMoreShapeHandlesOnHover Gets or sets whether to show additional shape handles when the mouse is paused over a shape. Read/write.
ShowShapeSearchPane Gets or sets whether the Shape Search pane is visible in the Microsoft Office Visio user interface (UI). Read/write.
Stat Returns status information for an object. Read-only.

Cell

Properties Description
ResultStrU Gets the value of a ShapeSheet cell expressed as a universal string. Read-only.

Document

Properties Description
ContainsWorkspaceEx Gets or sets whether workspace information is saved with the document. Read/write.
DataRecordsets Returns the DataRecordsets collection contained in the document. Read-only.
DefaultSavePath Gets or sets the path to the location where Microsoft Office Visio saves the current document by default. Read/write.
Methods Description
CanUndoCheckOut Determines whether a Microsoft Office Visio document is checked out from a Microsoft Office SharePoint Portal Server site, so that if it is, the check-out can be subsequently undone.
ExportAsFixedFormat Exports a Microsoft Office Visio document as a file in a fixed format, either PDF or XPS.
GetThemeNames Returns a locale-specific array of names of themes contained in the document.
GetThemeNamesU Returns a locale-independent array of names of themes contained in the document.
RemoveHiddenInformation Removes hidden information, such as personal information and external data, from a Microsoft Office Visio document.
UndoCheckOut Closes a Microsoft Office Visio document checked out from a Microsoft Office SharePoint Server site, deletes the local copy of the document, discarding any changes, undoes the checkout, and then reopens the document.
Events Description
AfterRemoveHiddenInformation Occurs when hidden information is removed from the document.
BeforeDataRecordsetDelete Occurs before a DataRecordset object is deleted from the DataRecordsets collection.
DataRecordsetAdded Occurs when a DataRecordset object is added to a DataRecordsets collection.
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.

Documents

Events Description
AfterRemoveHiddenInformation Occurs when hidden information is removed from the document.
BeforeDataRecordsetDelete Occurs before a DataRecordset object is deleted from the DataRecordsets collection.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.
DataRecordsetAdded Occurs when a DataRecordset object is added to a DataRecordsets collection.
DataRecordsetChanged Occurs when a data recordset changes as a result of being refreshed.
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
ShapeLinkAdded Occurs after a shape is linked to a data row.
ShapeLinkDeleted Occurs after the link between a shape and a data row is deleted.

DrawingControl

Events Description
AfterRemoveHiddenInformation Occurs when hidden information is removed from the document.
BeforeDataRecordsetDelete Occurs before a DataRecordset object is deleted from the DataRecordsets collection.
DataRecordsetAdded Occurs when a DataRecordset object is added to a DataRecordsets collection.
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.

Event

Methods Description
GetFilterActions Returns an array of the filter actions set for the Event object.
SetFilterActions Specifies the extensions to the MouseMove event that Visio reports.

InvisibleApp

Properties Description
Assistance Gets a reference to the Microsoft Office (MSO) IAssistance object, which provides a means for developers to create a customized help experience for users within Microsoft Office. Read-only.
DataFeaturesEnabled Gets whether the data features in Microsoft Office Visio 2007 are enabled for the current instance of Visio. Read-only.
DefaultRectangleDataObject Returns an IDataObject interface that represents the Rectangle tool used in the Microsoft Office Visio user interface. Read-only.
LanguageSettings Returns a reference to the Microsoft Office (MSO) LanguageSettings interface. Read-only.
MyShapesPath Gets or sets where Microsoft Office Visio looks for the My Shapes folder on the user's hard disk. Read/write.
Events Description
AfterRemoveHiddenInformation Occurs when hidden information is removed from the document.
AfterResumeEvents Occurs after firing of events is resumed.
BeforeDataRecordsetDelete Occurs before a DataRecordset object is deleted from the DataRecordsets collection.
BeforeSuspendEvents Occurs before firing of events is suspended.
DataRecordsetAdded Occurs when a DataRecordset object is added to a DataRecordsets collection.
DataRecordsetChanged Occurs when a data recordset changes as a result of being refreshed.
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
QueryCancelSuspendEvents Occurs before the application suspends events in response to a client code. If any event handler returns True, the operation is canceled.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.
ShapeLinkAdded Occurs after a shape is linked to a data row.
ShapeLinkDeleted Occurs after the link between a shape and a data row is deleted.
SuspendEventsCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelSuspendEvents event.

KeyboardEvent

Properties Description
Stat Returns status information. Read-only.

Master

Properties Description
DataGraphicHidden Hides or displays a data graphic in the Data Graphics task pane in the Microsoft Office Visio user interface. Read/write.
DataGraphicHidesText Displays or hides the text of a shape or of the primary shape in a selection when a data graphic is applied to the shape or to the selection. Read/write.
DataGraphicHorizontalPosition Gets or sets the default horizontal callout position for members of the GraphicItems collection of the Master object of type visTypeDataGraphic. Read/write.
DataGraphicShowBorder Gets or sets whether a border is displayed around the graphic items contained in the data graphic that are in default positions. Read/write.
DataGraphicVerticalPosition Gets or sets the default vertical callout position for members of the GraphicItems collection of the Master object of type visTypeDataGraphic. Read/write.
GraphicItems Returns the GraphicItems collection that the master contains. Read-only.
Type Returns the type of the Master object. Read-only.
Methods Description
DataGraphicDelete Deletes the Master of type visTypeDataGraphic from the Masters collection of the document.
Events Description
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.

Masters

Methods Description
AddEx Adds a new Master object of the specified type to the Masters collection of a Microsoft Office Visio document.
Events Description
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.

MouseEvent

Properties Description
DragState Returns information about the state of mouse movement as it relates to dragging and dropping a shape. Read-only.
Stat Returns status information. Read-only.

Page

Properties Description
ThemeColors Gets or sets the current theme colors for the page. Read/write.
ThemeEffects Gets or sets the current theme effect for the page. Read/write.
Methods Description
DropLinked Returns a new shape on the drawing page linked to data in a data recordset.
DropManyLinkedU Creates multiple new shapes on the drawing page that are linked to multiple data rows in a data recordset. Returns the number of shape instances created and an array of IDs of those shapes.
GetShapesLinkedToData Returns an array of all shapes on the active page linked to data in the specified data recordset.
GetShapesLinkedToDataRow Returns an array of all shapes on the active page linked to data in the specified data row in the specified data recordset.
LinkShapesToDataRows Links multiple rows in the specified data recordset, as specified by their data row IDs, to multiple shapes on the page, and optionally applies the current data graphic to the linked shapes.
ShapeIDsToUniqueIDs Returns an array of unique IDs of shapes on the page, as specifed by their shape IDs.
UniqueIDsToShapeIDs Returns an array of shape IDs of shapes on the page, as specifed by their unique IDs.
Events Description
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.
ShapeLinkAdded Occurs after a shape is linked to a data row.
ShapeLinkDeleted Occurs after the link between a shape and a data row is deleted.

Pages

Events Description
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.
ShapeLinkAdded Occurs after a shape is linked to a data row.
ShapeLinkDeleted Occurs after the link between a shape and a data row is deleted.

Selection

Properties Description
DataGraphic Gets the data graphic master (Master object of type visTypeDataGraphic) of the primary shape in the selection. Sets the data graphic master of all shapes in the selection. Read/write.
Methods Description
AutomaticLink Links selected shapes to data rows in the specified data recordset automatically, without requiring you to specify the exact correspondence of all shapes and data rows. Returns the number of shapes linked.
BreakLinkToData Breaks links between all shapes in the selection and data rows in the specified data recordset.
GetIDs Gets the shape IDs of the shapes in the selection.
LinkToData Links a selection of shapes to a single data row in a data recordset.

Shape

Properties Description
DataGraphic Gets or sets the data graphic master (Master of type visTypeDataGraphic) that is associated with the shape. Read/write.
IsDataGraphicCallout Specifes whether a shape is a data graphic callout. Read-only.
Methods Description
AutoConnect Automatically draws a connection in the specified direction between the shape and another shape on the drawing page.
BreakLinkToData Breaks the link between the shape and the data row to which it is linked in the specified data recordset.
GetCustomPropertiesLinkedToData Gets the IDs of the shape-data-item (custom property) rows in the Shape Data section of the shape's ShapeSheet spreadsheet linked to the specified data recordset.
GetCustomPropertyLinkedColumn Gets the name of the data column linked to the shape data (custom property) row in the shape's ShapeSheet spreadsheet specified by the custom property index.
GetLinkedDataRecordsetIDs Gets the IDs of all the data recordsets that contain data rows linked to the shape.
GetLinkedDataRow Gets the ID of the data row in the specified data recordset linked to the shape.
IsCustomPropertyLinked Returns whether the shape data (custom property) row in the Shape Data section of the shape's ShapeSheet spreadsheet is linked to a data row in the specified data recordset.
LinkToData Links a shape to a data row in a data recordset.
Events Description
GroupCanceled Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.
QueryCancelGroup Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.
ShapeDataGraphicChanged Occurs after a data graphic is applied to or deleted from a shape.
ShapeLinkAdded Occurs after a shape is linked to a data row.
ShapeLinkDeleted Occurs after the link between a shape and a data row is deleted.

Window

Properties Description
SelectedDataRecordset Gets or sets the data recordset that is displayed on the active tab of the External Data Window in the Microsoft Office Visio user interface (UI). Read/write.
SelectedDataRowID Gets or sets the ID of the data row that is selected (or that is the primary row selected, when multiple rows are selected) on the active tab of the External Data Window in the Microsoft Office Visio user interface (UI). Read/write.

New Constants

The following constants have been added to existing enumerations in Microsoft Office Visio 2007.

Enumeration New Constants
VisBoundingBoxArgs visBBoxIncludeDataGraphics
VisCellIndices visCompPath visEvtCellMultiDrop visLockFromGroupFormat visLockThemeColors visLockThemeEffects visObjTheme visSLOPlaceStyle
VisCellVals visCalThaiBuddhist visLOPlaceBottomToTop visLOPlaceCircular visLOPlaceCompactDownLeft visLOPlaceCompactDownRight visLOPlaceCompactLeftDown visLOPlaceCompactLeftUp visLOPlaceCompactRightDown visLOPlaceCompactRightUp visLOPlaceCompactUpLeft visLOPlaceCompactUpRight visLOPlaceDefault visLOPlaceHierarchyBottomToTopCenter visLOPlaceHierarchyBottomToTopLeft visLOPlaceHierarchyBottomToTopRight visLOPlaceHierarchyLeftToRightBottom visLOPlaceHierarchyLeftToRightMiddle visLOPlaceHierarchyLeftToRightTop visLOPlaceHierarchyRightToLeftBottom visLOPlaceHierarchyRightToLeftMiddle visLOPlaceHierarchyRightToLeftTop visLOPlaceHierarchyTopToBottomCenter visLOPlaceHierarchyTopToBottomLeft visLOPlaceHierarchyTopToBottomRight visLOPlaceLeftToRight visLOPlaceParentDefault visLOPlaceRadial visLOPlaceRightToLeft visLOPlaceTopToBottom visPLOPlaceHierarchyBottomToTopCenter visPLOPlaceHierarchyBottomToTopLeft visPLOPlaceHierarchyBottomToTopRight visPLOPlaceHierarchyLeftToRightBottom visPLOPlaceHierarchyLeftToRightMiddle visPLOPlaceHierarchyLeftToRightTop visPLOPlaceHierarchyRightToLeftBottom visPLOPlaceHierarchyRightToLeftMiddle visPLOPlaceHierarchyRightToLeftTop visPLOPlaceHierarchyTopToBottomCenter visPLOPlaceHierarchyTopToBottomLeft visPLOPlaceHierarchyTopToBottomRight visPLOPlaceParentDefault
VisDocVersions visVersion120
VisDrawRegionFlags visDrawRegionIncludeDataGraphics
VisEventCodes visEvtCodeAfterResumeEvents visEvtCodeBeforeSuspendEvents visEvtCodeCancelSelGroup visEvtCodeCancelSuspendEvents visEvtCodeQueryCancelSelGroup visEvtCodeQueryCancelSuspendEvents visEvtDataRecordset visEvtRemoveHiddenInformation visEvtShapeDataGraphicChanged visEvtShapeLinkAdded visEvtShapeLinkDeleted
VisObjectTypes visObjTypeDataColumn visObjTypeDataColumns visObjTypeDataConnection visObjTypeDataRecordset visObjTypeDataRecordsetChangedEvent visObjTypeDataRecordsets visObjTypeGraphicItem visObjTypeGraphicItems
VisOpenSaveArgs visAddDeclineAutoRefresh visOpenDeclineAutoRefresh
VisPasteSpecialCodes visPasteVisioShapesWithoutDataLinks
VisSelectionTypes visSelTypeByDataGraphic
VisSpatialRelationFlags visSpatialIncludeDataGraphics
VisUICmds visCmdAddDataRecordset visCmdAllowThemes visCmdApplyDataGraphic visCmdApplyDataGraphicAfterLink visCmdApplyThemeToDoc visCmdApplyThemeToPage visCmdAutoConnectToggle visCmdAutoGenerateDataGraphics visCmdDataAutoConnect visCmdDataAutoLink visCmdDataAutoLinkWiz visCmdDataColumnSettingsDlg visCmdDataExplorerWindow visCmdDataRecordsetProperties visCmdDataRecordsetSetCommand visCmdDataRecordsetSetPrimaryKey visCmdDataRefresh visCmdDataRefreshAddConflict visCmdDataRefreshConfigDlg visCmdDataRefreshDeleteConflict visCmdDataRefreshDlg visCmdDataRefreshResolveConflict visCmdDataSelectorDlg visCmdDataUnlinkRow visCmdDataUnlinkShape visCmdDeleteDataGraphic visCmdDeleteDataRecordset visCmdDeleteForwardWord visCmdDeleteTheme visCmdDropManyLinked visCmdDuplicateDataGraphic visCmdDuplicateTheme visCmdEditTheme visCmdFileUndoCheckout visCmdInsertTextBox visCmdInsertVertTextBox visCmdLinkRowToShape visCmdNewThemeColors visCmdNewThemeEffects visCmdOfficeDiagnostics visCmdRelayoutShapes visCmdRemoveDataGraphicFromSel visCmdRemoveThemeFromSel visCmdRHI visCmdRHIDlg visCmdSaveAsFixedFormatDlg visCmdSizeObjects visCmdSpellingOptionsDlg visCmdStenNamesUnderIcons visCmdTaskPane visCmdTaskPaneDataGraphic visCmdTaskPaneDocumentManagement visCmdTaskPaneResearch visCmdTaskPaneReviewer visCmdTaskPaneThemeColors visCmdTaskPaneThemeEffects visCmdTaskTogglePreviewSize visCmdTrustCenterDlg visCmdUpdateColumnsInLinkedShapes visCmdViewDirectionToggle visCmdViewLeftToRight visCmdViewRightToLeft
VisUIObjSets visUIObjSetCntx_DataExplorerList visUIObjSetCntx_DataExplorerListLinked visUIObjSetCntx_DataExplorerTabs
VisWinTypes visWinIDExternalData