Visio 2003 Developer's Survival Pack
Additional Notes
Home   V11DSP   This page

Additional Notes, Errata etc Organized by Table of Contents

Section Page Comment

Part 1: Overview Of The Visio Development Environment

Chapter 1: Introduction

23  

Programmable Diagramming: Enter Visio

24  

The Development Challenges

24  

Who This Book Is For

25  

What This Book Covers

26  

What This Book Does Not Cover

26  

Caveat: This Book Is Probably Wrong!

26  

Companion Website for Tools, Samples, Updates

27  

Visio Version Information

27  

Acknowledgements

28  

Chapter 2: Overview of Visio Territory

29  

The User's View

29  

The Developer's View

30  

Generic Solution Structure

31  

At the Heart

31  

Automation

32  

Added Functionality

32  

Connections To Data

34  

Example Scenarios

35  

First Look At Visio Structure

36  

"Model + View + Controller" Structure

37  

Document Types and Roles

37  

Where The ShapeSheet Environment Fits In

38  

ShapeSheet Heavily Used In Automation Too

39  

The Automation Environment

39  

Visio Model vs. Solution Model

40  

From Here

40  

Chapter 3: A Plan For Coping

41  

Planning Your Course Of Study

41  

1. This Book Builds On Other Essential Sources

41  

2. Use the Automation Object Model as Mental Scaffolding

43  

3. Reading Strategies

43  

Preparation

44  

Multiple Monitors

44  

Get Comfortable With VBA

44  

Companion Website For This Book

44  

Visio 2003 Developer's Survival Pack Browser Tools

45  

Document-Page-Window Browser

45  

Drag-And-Drop Spy

45  

Geometry Helper

45  

ShapeSheet Developer Helper

45  

Screwdriver for Directional Connection Points

45  

Animation Addon

45  

Events Browser

45  

UIObjects Browser

45  

CommandBars Browser

45  

Inheritance Browser

46  

XML Browser

46  

Bulk VS?-to-XML Converter

46  

Visio.bin Browser

46  

Download and Installation

46  

Visio 2003 Developer's Survival Pack Utilities

46  

VB-to-VSL Adapter Component

46  

Registration Tools

46  

Other References and Support

46  

Books

46  

Newsgroups

47  

Websites

47  

More Visio Tools

47  

Preliminary Visio and VBA Skillset

47  

Preliminary User-level Visio Activities

48  

Some ShapeSheet Activities

49  

Preliminary Developer-Level Activities

49  

From Here

50  

Part 2: Visio Structural Breakdowns

Chapter 4: Visio Object Model

53  

Object Model Developments in Visio 2003

53  

Expanded Object Model

55  

Objects with Cells

55  

Collections Versus Individual Objects

55  

User Interface Objects Shown Abbreviated

55  

Layer Objects

55  

Relationship To DVS and Poster Object Models

55  

Browsable Object-Property-Method Tables

56  

Tools for Object Model Browsing

56  

Visimation Xpose

56  

VBA Object Browser

57  

VBA Locals Window

57  

XML Browser

58  

Additional Tools

58  

From Here

58  

Chapter 5: ShapeSheet Structure and Functions Introduction

59  

Orientation

59  

Complete Automation Understanding Must Include Cells!

59  

ShapeSheet-Environment Covers "Content" Branch of Object Model

60  

ShapeSheet Organized as Sections, Rows and Columns

60  

ShapeSheet Section-Row-Cell Reference Tables

62  

ShapeSheet Orientation Continued

62  

"All ShapeSheets Behave the Same"

62  

How the ShapeSheet Applies to Diagram Shapes

62  

Objects Which Contain Cells Via Dummy Shapes

63  

Objects Which Contain Cells Directly

63  

ShapeSheet Sections and Rows

64  

Varying Section-Row Structures

64  

Sections and Rows vs. Objects

66  

ShapeSheet Formulas and Functions

66 Table 5-2: Sections Reviewer, Annotation and SmartTag should have their Applicability marked with "3" (instead of "Y") to indicate they are new to Visio 2003.

From Here

68  

Part 3: Visio Functional Areas In Depth

Chapter 6: Visio Files: Drawings, Stencils, Templates

71  

Top Concepts

71  

Organizing Our Overview

72  

Use XML Browser

73  

File Relationships

73  

Drawing File Point-of-View

73  

Drawing File With Stencil

74  

Template file

75  

Summary of Roles of Document Components

77  

Silly Visio File Tricks

77  

File Architecture Implications

77  

Developing Masters and Styles

77  

Where To Put VBA Code?

78  

How Visio Groups Solution Components

78  

Directory-Based Component Grouping

78  

MSI-Based Component Grouping

79  

MSI 5 Cent Tour

80  

Alternate Names: How Visio Finds Templates and Stencils

81  

Conclusions

81  

From Here

82  

Chapter 7: Shapes

83  

Comfort First

83  

Shapes and Masters

83  

"Hello World" via Automation and VBA

84 Example in book shows "Basic Shapes.vss" as stencil name. Prior to Visio 2003, this selected the appropriate stencil by virtue of matching the actual filename.   In V2003, this no longer matches the stencil's actual filename, and also may not be provided as an alternate stencil name, to avoid confusing US and metric stencils.

 Instead use the universal name for the desired stencil, as in the sample code in HelloWorld.vsd:
Set ADoc = Documents("BASIC_U.vss")
 

Single Shape Type, Distinguishing Attributes

84  

Shape Features Overview

84  

Identity and Name

86  

Some Subtleties

88  

Coordinate Space and Alignment Box

89  

Coordinate Space

89  

One-Dimensional Shapes (Connectors)

90  

Alignment Box

91  

Selectively Enabling/Disabling Various Geometry-Controlling Features

92  

Geometry and Geometry Attributes

92  

Geometry Row Types

92  

Geometry Attributes

93  

Geometry-Related Formatting

94  

Adjusting Feature Positions: Controls

94  

Text

94  

Studying Visio's Supplied Stencils and Templates

95  

From Here

95  

Geometry In Detail

95  

Text in Detail

95  

Shapes With Member "Sub-Shapes" (Group Shapes)

95  

Connectors, 1-D Shapes

95  

Glue, Connections and Connection Points

95  

Solution-Specific "Data"

96  

Styles and Masters

96  

Layers

96  

Right-Click Context Menu: Actions

96  

Events

96  

Foreign Objects

96  

Hyperlinks

96  

Chapter 8: Shape Geometry

97  

Overview of Visio Geometry

97  

Visio Geometry Types

99  

Playing with Shape Geometry

100  

Automation: Don't Overlook DrawXxx Methods

100  

ArcTo, Ellipse and EllipticalArcTo

100  

ArcTo Row

100  

Ellipse Row

101  

EllipticalArcTo

102  

Some EllipticalArcTo Tricks

102  

Related Automation Methods for ArcTo, Ellipse and EllipticalArcTo

104  

Developer Aid: GeoHelper

104  

PolyLineTo Row Type

104  

Related Automation Methods for PolyLineTo

105  

NURBSTo Row Type

105  

NURBS in the Drawing Window

106  

NURBS Foundation

107  

In More Detail

107  

Correspondence to NURBSTo Row

111  

Closed (Periodic) NURBS: The Rap on Wrapping

112  

So What Are Those Visio Adjuster Handles Anyway?

113  

Solving Some Problems

113  

Summary Comparison of Visio UI Versus NURBS Features

114 Table 8-3, last row: "near begin point"

Dynamic Connector Geometry

115  

Related Automation Methods for NURBSTo

115  

References

115  

Ink

115  

From Here

116  

Chapter 9: Masters and Shapes

117  

"Master" versus "Shape Instance"

117  

Master-To-Shape and Shape-To-Master

118  

Starting From the New Master Command

118  

Starting From Drawing Page

118  

Stencil File versus Document Stencil

119  

Instances Are Always Created From Local Stencil

120  

Master Matching Alternatives

120  

Development Implications

120  

Other Notes

121  

From Here

121  

Chapter 10: ShapeSheet Mastery

123  

ShapeSheet Cell Reference Syntax

123  

Finding Out Cell Names

124  

Universal and Local Row and Cell Names

125  

Changed in Visio 2003

125 "(and their cells)"

Which Names Are Which?

125 p126, Developer Caution for Visio 2002/200 and Before: delete "and Before"

ShapeSheet Calculation Dependencies

126  

Cells Set Multiple Ways

127  

Monitoring Recalc Loops

128  

Keys To Solution

128  

Trickier Example

128  

To REALLY Break A Loop

129  

Twin Peaks Example

129  

Flaky Recalculation Problems

131  

The DEPENDSON( ) Function

132  

Visio 2003 SetAtRef Functions

133  

SetAtRefExpr(Last-Formula-Stuffed-In)

134  

SetAtRef( ) and SetAtRefEval( )

134 User.CtlPt2 formula had not updated at time of screenshot. Should be:
User.CtlPt2 = (Width*0.375)

Previous Examples Revisited

135  

Fancy Path for Control

136  

Glueable Stay-Horizontal Connector

136  

Guard( ) Function Revisited

137  

ShapeSheet Cell Types and Units

138  

Internal Numeric Value versus Output Appearance

138  

"Magic" X, Y Extraction

138  

Assumed Units

138  

Formula Change Tracking

139  

Aids for Developers

139  

Macro Recorder

139  

ShapeSheet Formula Tracing Window

139  

Cell Dependents and Precedents

140  

ShapeSheet Developer Helper Tool

140  

ShapeSheet Editing in XML Text Format

140  

Named-Row Reordering

141  

Automated Aids for Building Shapes

141  

Shape Studio

141  

Do-It-Yourself Shape Builder

141  

Editing and Studying XML Files

142  

From Here

142  

Chapter 11: All Things Text

143  

Shape.Text

143  

Overview

143  

Text Position

144  

Text Appearance

144  

Fields: ShapeSheet Values to Text

144 Table 11-1, rows 8 and 9: Columns G and H do not appear in ShapeSheet window.

Text To ShapeSheet: SHAPETEXT( )

144  

Text To ShapeSheet Value: EVALTEXT()

145  

Setting the Text from the ShapeSheet

145  

Selectively Enabling/Disabling Text Behaviors

146  

Text Formatting: Details

146  

Overview

146  

Character and Paragraph Sections: Controlling Text Format

146  

Paragraph Section

148  

Visio's Text Format Model Revisited

148  

ShapeSheet Text and String Functions

149  

Basic String Functions: New in Visio 2003

149  

Testing String Equality: STRSAME

150  

Making Text Fit

150  

Alignment Box Expands To Accommodate Text

150  

Text Scales Proportional to Shape Height

150  

Text Scales Smaller to Fit More Text

150  

Text Clipped to Shape Interior

150  

Level Text

152  

Text Follows Angle, Right-Side-Up

152  

Text Positionable by User

153  

Text Positioned Near Connector Endpoint

153  

Improved Text Quality and Behavior in Visio 2003

153  

Quality Settings

153  

Text Events

154  

Comments and "Screen Tips"

154  

Visio Style Comments (aka "Screen Tips")

154  

Office Style Comments

155  

Add Office Comment to Shape

155  

Related Text Topics

155  

Other Text Data Notes

155  

Smart Tags

156  

From Here

156  

Chapter 12: Composite Shapes Using Groups

157  

Group Structure

157  

Group As Holder Only

157  

Group As Shape With Sub-Shapes

158  

Member Coordinate Space

160  

Group Behavior Variants

160  

Resize Behavior

160  

Add On Drop, a Very Promising Feature

161  

Controlling The Alignment Box

162  

Controlling Formatting

162  

Controlling Selection During Shape.Drop

163  

A Composite Shape Example

163  

Structure

163  

Behavior

164  

ShapeSheet

165  

Editing The Structure With VBA Functions

166  

Embellishments

169  

Protection/Enablement Issues

170  

Cell Dependents and Precedents

170  

Form-Style Text Behavior

171  

Navigation

171  

Text Clipping

171 Keyboard events: Issue: These do not fire when a shape is in text editing mode.

From Here

172  

Chapter 13: Connectors, Routing and Layout

173  

Plan of Attack

173  

Connectors Using Ordinary ShapeSheet Features

174  

1-D Coordinate Space

174  

Straight Connector

175  

Curve Connector

176  

Right Angle Connector

176  

Shortcomings

177  

Universal Connector

177  

Further Caveats

180 Small-font section, after "This workaround..." The reference to SR1 was Visio 2000 SR1. The ability to disable dynamic connector vertex handles was resolved in Visio 2002.

Summary of Simple Connectors Implementation

180  

Dynamic Layout Services

181  

Overview of Dynamic Layout Services

181  

Basic DLS Participation Eligibility: ObjType

182  

Dynamic Layout Services Details

183  

Routing

184  

Connector "Appearance"

185  

Line Jumps

185  

Plowing

185  

Layout

186  

Dynamic "Walking" Glue

187  

Page-level DLS Disable: DynamicsOff

187  

Connector Splitting

187  

Dynamic Connectors

188  

Dynamic Connector Geometry

188  

Implications For Geometry Dependents

189  

Text Pin

189  

Connection Points

190  

Control Points

190  

Enable/Disable Dynamic Connector Functionality

190  

Some Dynamic Connector Developer Issues

190  

Alternative Solutions to Fancy Routing

193  

Comments

195  

Dynamic Layout Performance Hints

196  

Comparison of Connector Strategies

196  

From Here

198  

Chapter 14: Glue and Connects

199  

Orientation

199  

What Glues to What

201  

Glue In Action

201  

Initialization

201  

How Gluer Depends on Gluee

203  

Control Point to Connection Point

203  

Connector Endpoint to Connection Point

203  

Connector to "Shape": Dynamic or "Walking" Glue

203  

Various Parts to Guide Lines

204  

Visio's Gendered, Directional Connection Points

204  

Working with Gendered Connection Points

205  

Factors Affecting User Operation of Glue

207  

Enhanced Snap and Glue Control in Visio 2002/3

207  

Lock/Guard Glue Formulas

209  

Connections To/From Group Member Shapes

209  

Some Glue Issues

209  

Dynamic Glue (_WALKGLUE) Issues

209  

Connects Objects: Reporting On Connections

210  

Connects Just Reports on Cells

210  

Some Connections Report As Two Connect Objects

210  

Connector-Sensitive Connection Points

210  

Other Notes

211  

Temporary Connection Points

211  

Visio 2003's Connector Splitting Feature

211  

From Here

212  

Chapter 15: Formatting Via Masters and Styles

213  

Mastering Master Concepts

214  

Copying versus Inheritance

214  

The Initial Master-Instance Relationship

214  

Verifying Inheritance/Local Behavior

215  

Creating and Removing Local Override Formulas

216  

Severing Master-Shape Inheritance

216  

Master Identity and Names

216  

Styles-The Basics

216  

Style "Attribute Sets": Three Sets of Cells

217  

Style-to-Style Inheritance

218  

Master and Style Inheritance, Together At Last

218  

Developer Aid: Style Clues in the ShapeSheet Window

219  

Developer Aid: Inheritance Browser

220  

Three "Sub-Style" Attribute-Sets Versus Overall "Style"

220  

Applying a Style

221  

Applying a Style Switches Inheritance For Entire Attribute-Set

221  

Applying a Local Formula or Value to a Cell

221  

Does "Apply Style" Beat Guard() and LockFormat?

222  

Reverting a Section or Cell to Inheritance

222  

Un-Applying a Style (Revert to Inheritance-from-Master)

222  

Style Collisions

222  

Style Philosophy and Application

223  

Styles as Named Sets of Attribute-Values

223  

Styles for Conveying Semantics

223  

The Evil "Color Scheme" Add-On

224  

Rethinking the Motivation

224  

Bottom Line

225  

Some Development Implications

225  

Seemingly Superfluous Style Sections?

225  

Incomplete Inheritance Visibility

225  

The Need for Tools

226  

From Here

226  

Chapter 16: Line and Fill Patterns and Line Ends

227  

Relationship Between Pattern Masters and Instances

227  

Parameters

228  

Line Pattern and Line End Miscellany

229  

Creating Unscaled Line-Ends

229  

Line End Sizing Ratios

230  

Line Pattern and Line End Positioning

231  

Line Patterns vs Overlaid Lines

231  

Other Wrinkles

232  

From Here

232  

Chapter 17: Documents, Pages, Layers and Markup

233  

Document

233  

Page

235  

PageSheet

236  

Background Pages

237  

Markup

237  

Markup Pages

237  

View with DocPgWin Tool

237  

Working with Markup

238  

Markup's Default Behavior

238  

Implementing Rigorous Markup Behavior

239  

Markup Task Pane Markup List

241  

Convert Markup to Normal Page

241  

Layers

241  

Layer Structure And Behavior

242  

A Page's Layers Versus the Layers Object

242  

A Shape's Layer Membership

242  

Adding/Deleting Layers

242  

Assigning Shapes to Layers

242  

Using Layers

242  

Layers For Shape Data Attributes and Querying

243  

Querying Made Feasible

244  

Layer Control Tricks

244  

From Here

245  

Part 4: Building Visio Solutions

Chapter 18: Building Solutions: Introduction

249  

Overview

249  

Alternative Solution Forms

250  

Summary

251  

Orientation to Visio User Interface, Events and Windows

252  

Preview of Some Key Issues

253  

Angle of Upcoming Solution Topics

254  

A Note on Visual Studio.NET

254  

Different Visio Roles, Different Forms of Solution

255  

Visio for Rendering/Output

255  

Visio for Information Capture

255  

"Discipline-Specific Drawing Environment"

256  

Discrete Operations on Drawing

256  

Adding Intelligence to Shapes: "Shape Services"

257  

Adding Intelligence to Drawings: Drawing-wide Semantics

257  

Drawings as Views of Models

257  

Visio as Control Panel

258  

Visio Drawing Control Opportunities

258  

From Here

258  

Chapter 19: Menus, Toolbars, Accelerators

259 See suppplemental info, end of this chapter section

Orientation

260  

Two User Interface Models to Choose From!

260  

Study Sequence

261  

Overview of UIObject-Based Object Model

261  

Items

261  

"Groups" of Items

262  

"Sets" Handle "Context"

262  

Extent of User Interface Data

262  

Three "Levels" Of UI Customization

263  

UIObjects: Messy Details

265  

UIObject Browser: Completing the Picture

265  

Overview of CommandBars-Based UI Object Model

266  

Visio's Use of CommandBars

267  

CommandBarControl Events

268  

CommandBar Browser

268  

Document-Specific CommandBars?

269  

UIObjects and CommandBars, Together At Last

269  

UIObject-Based Model to CommandBars

270  

CommandBars to UIObject-Based Model

270  

Implications for CommandBarControl Events

272  

Usability of CommandBar Model

273  

General UI Strategy Using the UIObject-Based Model

274  

Constructing a Custom UI

274  

Details

274  

Persisting and Instating a Custom UI

276  

Other Sources of Menus and Menu-Like Things

277  

Don't Forget ShapeSheet Actions Section!

277  

Visio 2003: SmartTags Piggyback on Actions

278  

MouseDown Popup Menus

278  

Wrinkles

278  

Potentially Confusing UIObject Names

278  

Persistent Events on Visio Templates Caused UI Confusion

278  

Disappearing Toolbar Items

279  

Example UI Exercises

279  

Adding UI Elements

279  

Minimal UI

281  

From Here

282  
SUPPLEMENT: Macro Shortcut   Not mentioned in this chapter, but relevant is: Visio 2003 adds the ability to associate a shortcut key with a particular macro, via the Macros dialog box (Tools > Macros > Options). This is limited to Ctrl-something where something is an alpha character -- note: many of those are already dedicated to built-in function (eg: Ctrl-B for bold and so on).
The mechanism this uses is to attach a VB_ProcData.VB_Invoke_Func attribute to the macro (VB Sub) in question... something you can see if you save the VBA module as text. It's not clear to me if this is a Good Idea... but it's good for a quick hack.

Chapter 20: Events and Other Notifications

285 "See page XXX" references: note_ch20_xxx

Overview

285  

Several Different Event Mechanisms

288  

Event Persistence

288  

Notifications from ShapeSheet Activities

288  

CALLTHIS

289  

RUNADDON

290  

RUNADDONWARGS

291  

Dedicated Event Cells

292  

QueueMarkerEvent

292  

Automation Events Overview

293  

Spectrum of Events Exposed

293  

Event Filters

294  

Document Events

294  

WithEvents Event Handling

294  

WithEvents Overview

295  

Code for WithEvents: Simple Case

295  

Forgetful" VBA?

296  

Example With Model

296  

Code for WithEvents: More Realistic Case, Using Class Module

297  

Further Issues

300  

Events Via EventList.Add and AddAdvise

301  

Developer Aids

301  

Events Browser

301  

Event Trace

302  

SDK Event Monitor

302  

EventList.Add

302  

EventList.AddAdvise

304  

Simple Event Sink Example

305  

Event Sink with Forwarding

306  

Persistence

307  

AddAdvise Compared To WithEvents

307  

EventList Interacts With WithEvents

307  

Filters

308  

Miscellaneous Issues

310  

QueueMarkerEvents Revisited

310  

NoEventsPending versus VisioIsIdle

311  

BeforeXXX Events

312  

VB/VBA Issue With Signed Two-Byte EventCode Values

312  

Mouse and Keyboard Events

312  

.NET Implications

313  

From Here

313  

Chapter 21: VBA-Based Solutions

315  

Visio VBA State-Of-Play

315  

Overview

316  

Benefits and Drawbacks of VBA-Based Solutions

316  

The Modules of a VBA Project

317  

"Ordinary" Modules

318  

Class Modules

318  

Forms

319  

ThisDocument Module

320  

Be Aware of VBA Project Behavior Options!

321  

Getting Rid of a VBA Project

321  

Where To Put Solution Code

321  

Put VBA Code In Stencil

322  

What About Document Events?

322  

Copying Code From Stencil To Drawing

322 p323 small-font Note on accessing VBE from code. This is further complicated by the issue that access to the VBE object model is governed by security checks -- I think this is new in Visio 2003. Check MSDN Library for details (this is a generic VBA/VBIDE issue).

Cross-Project and ShapeSheet-to-Project References

323  

Project to Project

323  

Calling from ShapeSheet, (and UI Items and Events)

324  

Establishing Drawing-to-Stencil References

325  

Project Paths

326  

Project Names

326  

From Here

326  

Chapter 22: "Visio Solution Library" Solutions: VSLs and Addons

327  

Overview of VSL Features

328  

The VSL API

328  

The Visio-to-VSL Conversation

329  

Introducing the VBVSL_Adapter

330  

Overview of VBVSL and Adapter

330  

Minimal "VBVSL_Min" Example

331  

IVBVSL Interface Details

331  

Fulfilling the Needs of VBVSL.cls

334  

Structure For More Complex VSLs

338  

Breaking Down Functionality By Addon Or "Command"?

338  

Installation, Registration and Uninstallation

339  

VSL/Addon Registration With Visio

340  

VSL Unregistration

340  

Additional VSL Installation Considerations

340  

.NET and VSLs

341  

Summary of Benefits and Drawbacks to VSLs

341  

Benefits

341  

Drawbacks

342  

From Here

342  

Chapter 23: Exe and Out-of-Process Solutions

343  

Out-Of-Process Concerns

344  

Integration With Visio

344  

ReflectArgs Exe Example

346  

Conclusions

347  

.NET Exe Solutions

347  

From Here

347  

Chapter 24: COM Addin Solutions

349  

COM Addins Overview

349 MSDN: Creating  COM Add-ins for Visio

COM Addins In Visio

350  

Conclusion

351  

From Here

352  

Chapter 25: Solution Window Management

353  

Visio's "Windows"

353  

Windows

354  

Window methods and Attributes

355  

Example: Hiding the Shape Search Window

355  

Task Pane

356  

Solution Windows in Visio

356  

Out-of-Process vs. In-Process Windows

356  

Default Visual Basic Form Behavior

357  

Modal Form

357  

Modeless Form

357  

Coordinating modeless windows with Visio

357  

Plain Desktop window

358  

Plain MDI Child window

360  

Anchor window

361  

Stencil window

365  

From Here

366  

Chapter 26: Visio ActiveX Drawing Control

367  

Basic Visio Drawing Control Container

367  

"Single Document" Concept

368  

File > New

368  

File > Open

369  

File > Save As

369  

File > Save

370  

Additional Sample Functions

370  

Open a Stencil

370  

Tidy Windows

370  

Access the Automation Model from Host App

371  

Respond To Events

372  

Respond to Visio Object Events

373  

Other Ideas

373  

Further Considerations

374  

Drawing Control's Relation to Visio Application

374  

VDC.HostID

374  

Using Multiple Controls

374  

User Interface

375  

Utility of Addons and Addins in VDC Scenarios

375  

From Here

376  

Chapter 27: ShapeSheet Service Addons

377  

Event Lifetimes and "ShapeSheet Services"

377  

ShapeSheet Services Pattern

378  

Demo ShapeSheet Services Sample

378  

Main ShapeSheet Services Concepts

379  

"Demo ShapeSheet Services" Sample

379  

I-Am-Selected Service

380  

Supporting Utility Functions

383  

Connect Count Service

383  

Navigation Keys Service

384  

Further Notes on Demo ShapeSheet Services Sample

386  

Conclusions

386  

From Here

386  

Chapter 28: Visio and XML

387  

Visio 2003's XML Features

387 IMPORTANT: Visio 2003's default installation sets Visio to output XML in a format with no indents and few linebreaks. This is very difficult to use in a text editor. To get Visio to output semsibly formatted XML, there's a registry setting:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Visio\Application]
"XMLEmitIndents"="1"

Optional XML File Format: "XML for Visio"

387  

VDX-Format IDataObject and Drag and Drop

388  

Solution-Specific XML In Document

388  

Solution-Specific XML in ShapeSheet

388  

SVG Format Export

388  

Making Sense of XML

388  

What XML Looks Like

388  

It's A Document, No Wait, It's A Database, No Wait...

389  

MSXML

390  

XSL and XSLT

390  

Schemas

391  

Namespaces

391  

Hands-On "XML for Visio"

392  

Studying VDXs To Learn Visio Structure

392  

"XML for Visio" for Hard-to-Fix Fixups

393  

SolutionXML Examples

394  

Processing "XML for Visio" Files

396  

Ideas

396  

Using MSXML to Iterate Through All Nodes

397  

View

397  

Change: Re-Mastering Shapes

399  

Let MSXML Do The Walking: XSL Patterns and XPath

399  

Visio XML Straight To HTML, in Code

400  

Visio XML Straight To HTML, in Browser

401  

Wrinkles

402  

Generating XML for Visio

403  

From Here

406  

Chapter 29: IDataObject and Shape Drag-and-Drop

407  

Visio's Use of OLE Drag and Drop

408  

Drag and Drop Objects

408  

Introducing IDataObject

410  

From Visio Shape to IDataObject

410  

"Clipboard" Data Formats

411  

Summary So Far

411  

Stencil-Like Features, Using Various Languages

411  

Visual Basic 6 and VBA

411 Bottom of page: the "hard work" demo is actually the example described starting on page 417, with the code on p419 showing how to repackage the IDataObject data.

C# .NET Implementation

414  

VS 6 C++ and Borland Delphi Implementation

415  

XML IDataObject

415  

XML Data To Visio

415  

XML Data From Visio

416  

Persisting IDataObject Data

417  

VB6 Drag and Drop The Hard Way

417  

Drag And Drop Demo

417  

From Here

422  

Chapter 30: Visio and ActiveX

423  

Using Ordinary ActiveX Controls in a Visio Document

423  

Dynamically Adding ActiveX Controls to Drawing

424  

Documents Linked/Embedded In Visio

425  

Visio ActiveX Control?

426  

Accessing Visio from Within an "ActiveX Shape"

426  

AXShape Sample

426  

From Here

428  

Chapter 31: Animation

429  

"Manual" Animation

429  

Move Disappointing, Rotate Works

429  

Live Dynamics Option and Shape Cell

430  

Overcoming Move Problem: Use Control Point

430  

No VBA While Dragging--Some Alternatives

431  

"Real" Animation

431  

Animation Component

431  

Following A Path

432  

Off-Screen Drawing

435  

Faster Roads (and other Path Patterns)

435  

From Here

436  

Chapter 32: Export and Bitmap Topics

437  

Working with Bitmaps In Visio

437  

Bitmaps, Start to End In Visio

438  

Other Factors Impacting Bitmap Output Quality

439  

Shape With Swappable Bitmap

440  

Save As Web Page

441  

Controlling Bitmap Export From Code

441  

Document's Preview Picture

442  

From Here

444  

Chapter 33: Some Utilitarian Odds and Ends

445  

Persisting Solution Data

445  

Text In Cell

446  

XML

446  

VisXData and IStorage

446  

When to Persist

448  

Undo

448  

Undo Sample VBA

448  

Document Protection

449  

Registry

450  

Version Info

450  

From Here

452  

Chapter 34: Some Deployment Notes

453  

Considerations for Stencils and Templates

453 454, top line: "applies to the use of Layers"

Considerations for VSL and COM Addins

455 Notes on signing code (avoiding macro security warnings]  note_signcode.htm

From Here

455  

Chapter 35: Internationalization Features

457  

Overview of Internationalization Features

458 paragraph 4: "consistent rule that, for the end-user, the user interface"

Automation Model

458  

Shape Sheet Window: Changed for Visio 2003

458  

Details

459  

"First time sets both names" Behavior

459  

Named Rows

459 near bottom of page: "...perhaps edited a row name several times (in a legacy document, using Visio 2002 or 2000), probably didn't get..."

Default Collection Properties

460  

Cells() Special?

461  

Cell.Formula Not Just Local

461  

ShapeSheet Formula Units

461  

Decimal Points and Argument Separators

461  

Special Case: SETF

461  

Visio-Supplied Stencil Names

462  

Migration Issues

462  

From Here

462  

Part 5: Browsable Reference to Visio Structure

Chapter 36: ShapeSheet Section-Row-Cell Structure

465  

Reading The Tables

465  

Constants

465  

Finding The Section Of Interest

466  

Chapter 37: ShapeSheet Functions

487  

Chapter 38: Visio Objects, Properties and Methods

497  

This Section Available for Download Only

497  

Chapter 39: Events Table

503  

Index

507  
_________________________________________________    

Performance Notes

A few additional notes for faster performance:


Article Created: 2003-10-01  Last edit: Last edit: 03-11-24 Graham Wideman Go to:  DiagramAntics.com