This documentation is archived and is not being maintained.

What's New in Automation for Microsoft Visio 2002

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
 

Microsoft Corporation

March 2001

Applies to:
     Microsoft Visio Standard 2002
     Microsoft Visio Professional 2002

Summary: This article describes the new events, methods, objects, and properties in the Microsoft Visio 2002 Object Model. (9 printed pages)

Contents

Introduction
New Events
New Methods
New Objects
New Properties
New Object Model
For More Information

Introduction

Experience faster and more complete access to Visio data with more than 90 new events, methods, objects, and properties in the Microsoft® Visio® 2002 object model. These new features include more complete access to persisted document data, an event filter to quicken response time, and better access to a variety of commonly used areas. The following tables describe the new events, methods, objects, and properties in Visio 2002.

New Events

The following new event has been added to Microsoft Visio 2002.

New eventObjectDescription
OnKeystrokeMessageForAddonApplication, WindowOccurs when Visio receives a keystroke message from Microsoft Windows® that is targeted at an add-on window or child of an add-on window.

New Methods

The following new methods have been added to Microsoft Visio 2002.

New methodObjectDescription
CopyPreviewPicture DocumentCopies the preview picture from another document into the current document.
DeleteSolutionXMLElement DocumentDeletes the named SolutionXML element.
GetFilterCommands EventReturns an array of command ranges and a True or False value indicating how to filter events for that command range.
GetFilterObjects EventReturns an array of object types and a True or False value indicating how to filter events for that object.
GetFilterSRC EventReturns an array of cell ranges and a True or False value indicating whether you are filtering events for that range.
PasteSpecial Master, Page, ShapeInserts the contents of the Clipboard, allowing you to control the format of the pasted information and (optionally) establish a link to the source file (for example, a Microsoft Word document).
PrintTile PagePrints a single tile of a drawing page.
RenameCurrentScope ApplicationRenames the top-level open undo scope.
ResizeToFitContentsMaster, PageResizes the page, or the master's page, to fit tightly around the shapes or master that are on it.
SetFilterCommands EventSpecifies an array of command ranges and a True or False value indicating how to filter events for each command range.
SetFilterObjects EventSpecifies an array of object types and a True or False value indicating how to filter events for each object.
SetFilterSRC EventSpecifies an array of cell ranges and a True or False value indicating how to filter events for each cell range.
SwapEnds Selection, ShapeSwaps the begin and end points of a one-dimensional (1-D) shape.

New Objects

The following new object has been added to Microsoft Visio 2002.

New functionDescription
MSGWrapPassed as an argument with the OnKeystrokeMessageForAddon event. The MSGWrap object wraps the data contained in a message passed from Microsoft Windows to Visio.

New Properties

The following new properties have been added to Microsoft Visio 2002.

New propertyObjectDescription
ActivePrinter ApplicationSpecifies the printer that all Visio documents print to.
AllowEditing WindowDetermines whether the Edit command is enabled or disabled in a stencil window.
AvailablePrinters ApplicationReturns a list of installed printers.
BeginGroupMenuItem, ToolbarItemDetermines whether the menu item or toolbar item appears at the beginning of a group of items on the menu or toolbar.
BuildApplicationReturns the build number of the running instance.
BuildNumberCreated DocumentReturns the build number of the running instance used to create the document.
BuildNumberEditedDocumentReturns the build number of the running instance last used to edit the document.
COMAddinsApplicationReturns a reference to the COMAddIns collection that represents all the Component Object Model (COM) add-ins currently registered in Visio.
CommandBarsApplicationReturns a reference to the CommandBars collection that represents the command bars in the container application.
ContainsWorkspaceDocumentDetermines whether the document was saved as a workspace.
DefaultAngleUnitsApplicationDetermines the default unit of measure for quantities that represent angles.
DefaultDurationUnitsApplicationDetermines the default unit of measure for quantities that represent durations.
DefaultGuideStyleDocumentGets or sets the default guide style of a document.
DefaultPageUnitsApplicationDetermines the default unit of measure for quantities that represent position or distance.
DefaultTextUnitsApplicationDetermines the default unit of measure for quantities that represent text metrics.
DialogFontApplicationReturns a description of the font being used by Visio in its dialogs.
DynamicGridEnabledDocumentDetermines whether the dynamic grid is enabled or not.
EditCopyMasterReturns a master that is open for editing and originally copied from this master.
EmailRoutingDataDocumentReturns e-mail routing data for a document.
FooterCenterDocumentContains the text string that appears in the center portion of a document's footer.
FooterLeftDocumentContains the text string that appears in the left portion of a document's footer.
FooterMarginDocumentGets or sets the margin of a document's footer.
FooterRightDocumentContains the text string that appears in the right portion of a document's footer.
ForeignDataShapeReturns metafile, bitmap, or OLE data for a shape that represents a foreign object.
FullBuildApplicationReturns the full build number of the running instance.
FullBuildNumberCreatedDocumentReturns the full build number of the instance used to create the document.
FullBuildNumberEditedDocumentReturns the full build number of the instance last used to edit the document.
GlueEnabledDocumentDetermines whether glue is enabled in the document.
GlueSettingsDocumentDetermines the objects that shapes glue to when glue is enabled in the document.
HeaderCenterDocumentContains the text string that appears in the center portion of a document's header.
HeaderFooterColorDocumentSpecifies the color of the header and footer text.
HeaderFooterFontDocumentSpecifies the font used for the header and footer text.
HeaderLeftDocumentContains the text string that appears in the left portion of a document's header.
HeaderMarginDocumentGets or sets the margin of a document's header.
HeaderRightDocumentContains the text string that appears in the right portion of a document's header.
hwndMSGWrapGets or sets the hwnd field of the MSG structure being wrapped.
IconMaster, MasterShortcut, WindowReturns the icon contained in a master, master shortcut, or window.
IDDocumentReturns a run time ID that a document can be accessed by using ItemFromID.
InheritedFormulaSourceCellReturns the cell from which this cell inherited its formula.
InheritedValueSourceCellReturns the cell from which this cell inherited its value.
InhibitSelectChangeApplicationDetermines whether shapes are selected in the drawing window.
InPlaceDocument, WindowSpecifies whether a window is open in-place, or whether a document is being viewed through a window that is open in-place.
IsChangedMasterDetermines whether a master has changed since it was opened.
ItemFromIDDocumentReturns the document whose ID property equals the ID that you pass to the property, or raises an exception if no presently open document has that ID.
lParamMSGWrapGets or sets the lParam field of the MSG structure being wrapped.
MacrosEnabledDocumentReturns true if document has a VBA project that is opened in a state where it will agree to execute macros or process events.
MasterShapeShapeReturns the shape in the master that this shape inherits from if this shape is part of a master instance.
MergeCaptionWindowReturns the abbreviated caption that appears on the Page tab when the window is merged with other windows.
MergeClassWindowSpecifies a list of window classes that this anchored window can merge with.
MergeIDWindowSpecifies the string version of a merged window's globally unique identifier (GUID).
MergePositionWindowSpecifies the left-to-right tab position of a merged anchored window.
messageMSGWrapGets or sets the message field of the MSG structure being wrapped.
OnComponentEnterStateApplicationUsed by a non-MSO component to inform the Visio instance that it is instigating a pertinent state transition.
OriginalMasterReturns the original master that produced this open master.
PageTabWidthWindowGets or sets the width of the page tab control in a drawing window.
PasswordDocumentResets the document's password.
PictureMaster, Page, Selection, ShapeReturns a picture that represents an enhanced metafile (EMF) contained in a master, shape, selection or page.
posttimeMSGWrapGets or sets the time field of the MSG structure being wrapped.
PreviewPictureDocumentGets or sets the preview picture shown in the Open or Choose Drawing Type dialog box.
PrintCopiesDocumentSpecifies the number of copies to print.
PrinterDocumentSpecifies the name of the printer to use when printing the document.
PrintTileCountPageReturns the number of print tiles for a drawing page.
ptxMSGWrapGets or sets the pt.x field of the MSG structure being wrapped.
ptyMSGWrapGets or sets the pt.y field of the MSG structure being wrapped.
RootShapeShapeReturns the top-level shape of an instance if this shape is part of a master instance.
ShowPageTabsWindowDetermines whether page tab controls are shown in the drawing window.
ShowScrollBarsWindowDetermines whether scroll bars are shown in the drawing window.
SnapAnglesDocumentDetermines the degree of the angle that is drawn when isometric angle lines is chosen as a shape extension option.
SnapEnabledDocumentDetermines whether snap is active in the document.
SnapExtensionsDocumentDetermines the shape extensions that are active in a document.
SnapSettingsDocumentDetermines the objects that shapes snap to when snap is active in the document.
SolutionXMLElementDocumentContains solution-specific, well-formed XML data stored with a document.
SolutionXMLElementCountDocumentReturns the number of SolutionXML elements in a document.
SolutionXMLElementExistsDocumentIndicates whether a named SolutionXML element exists in the document.
SolutionXMLElementNameDocumentReturns the name of the SolutionXML element.
TimeDocumentReturns the most recently recorded date and time.
TimeCreatedDocumentReturns the date and time the document was created.
TimeEditedDocumentReturns the date and time the document was last edited.
TimePrintedDocumentReturns the date and time the document was last printed.
TimeSavedDocumentReturns the date and time the document was last saved.
VBAEnabledApplicationReturns true if Microsoft Visual Basic® for Applications (VBA) is presently enabled in Visio.
VBProjectDataDocumentReturns the Visual Basic project data stored with a document.
wParamMSGWrapGets or sets the wParam field of the MSG structure being wrapped.

New Visio 2002 Object Model

Click to view larger image.

Visio 2002 Object Model. Click to view larger image.

Figure 1. Visio 2002 Object Model

For More Information

To learn more about Visio 2002, see the following articles:

What's New for Developers in Microsoft Visio 2002

What's New in the ShapeSheet for Microsoft Visio 2002

Show: