Archive for the 'Development' Category
Posted by Visio Guy on 12th July 2008 - 182 views
In our last article on smart frames, we built a SmartShape that maintained a constant border-thickness, no matter the size of the shape.
It was a fairly simple frame, it got the job done, but it had a uniform frame-thickness all the way around, and offered no way for an end-user to change that thickness.
In this article, we’ll add some flexibility to the shape by making separate margin parameters for each side. We’ll also expose the margin settings to the user via Shape Data fields.
Read the rest of this entry »
Posted in ShapeSheet | No Comments »
Posted by Visio Guy on 23rd June 2008 - 435 views
VBA in Visio is great for learning, prototyping and getting repetitive tasks done quickly. One problem I run into--when I’m not careful—is bloated code resulting from the copying and pasting of too many loops. But with the CallByName function in VBA, we can streamline our code! Read the rest of this entry »
Posted in Code | 1 Comment »
Posted by Visio Guy on 21st June 2008 - 481 views

UPDATE!
Hey football/soccer fans! We've got an update to our automated smart drawing for this years European Cup soccer tournament.
Perhaps you are familiar with the first version, which can be found here: European Cup 2008 Auto-Updating Diagram
Well, that version needed a few updates, most notably, the handling of games that are resolved with penalty-kicks, or shoot-outs.
Read the rest of this entry »
Posted in Code, Drawings & Templates, Maps & Geography, ShapeSheet, Shapes | 2 Comments »
Posted by Visio Guy on 15th June 2008 - 532 views
If you create elevation drawings for rack systems, for cabinetry, for A/V systems with TVs and video monitors, or for walls with doors and windows, you'll find yourself needing frame shapes.
And while your equipment may come in different sizes, the frames should maintain consistency when they are stretched.
For example, you may have several sizes of monitor: 19-inch, 21-inch, 48-inch, etc. Even though the picture gets bigger, the bezel around the display stays the same thickness. You get more display area, not more plastic!
A Visio SmartShape offers an elegant way to depict these objects. With a little bit of ShapeSheet programming, you can make one shape that can do the job of several!
We'll call these shapes Smart Frames. This article is the first installment in a series about creating and understanding Smart Frame shapes in Visio! So enjoy this article and stay tuned in the future!
Read the rest of this entry »
Posted in ShapeSheet | 1 Comment »
Posted by Visio Guy on 14th June 2008 - 600 views
You can learn a lot from bad examples.
Call it learning-from-our-mistakes, anti-patterns, or devilish fun, there's a lot to be gained by looking at how-not-to-do-it.
Those of us over 30 might remember our first introduction to BASIC programming, taught to us by our friend Jeff, in the electronics corner at the local super market. While Mom was shopping, Jeff went over to the Commodore Vic 20 demo kiosk and typed the following lines:
10 PRINT "Chris is a turkey!"
20 GOTO 10
|
Utterly useless, except for the fact that it forever singed into our memory the ideas of branching and infinite loops...
Read the rest of this entry »
Posted in Development, ShapeSheet | 3 Comments »
Posted by Visio Guy on 9th June 2008 - 1826 views

Visio is a natural choice for creating brackets for sports tournaments.
I have seen many elimination-tournament diagrams created in Visio over the years. In fact, just a few years ago, a very nice example was done for the 2006 World Cup. You can get it at Office Online here: 2006 World Cup Bracket.
But the trouble with these diagrams is that they require *gasp* manual input of data, or user-movement of shapes. The horror!
Well this year, that is all going to change...
Read the rest of this entry »
Posted in Code, Drawings & Templates, Maps & Geography, ShapeSheet, Shapes | 22 Comments »
Posted by Visio Guy on 17th May 2008 - 545 views

A coding problem that Visio developers often stumble upon recently reared its ugly head yet again in the newsgroups. The question, very simply, was:
How do you programmatically detect sub-selected shapes?
The usual place to start is with a simple line of code, like:
Visio.ActiveWindow.Selection
But as it turns out, this line surprisingly does not return sub-selected shapes. So let's dig deeper into the problem so that you can get your projects finished!
Read the rest of this entry »
Posted in Code | 2 Comments »
Posted by Visio Guy on 28th April 2008 - 871 views
If you've ever drawn arcs in Visio, then grouped them together with other shapes, you may have noticed that they behave rather oddly on resizing. As you make the group bigger or smaller, the arcs may bow or squish in ways that you didn't expect.
This problem arises because of the interaction style of the arc shapes, which is 1D. Visio has two interaction styles: 1D and 2D. They have to do with the green handles you see on the shape, and how you go about manipulating the shape with the mouse.
In this article, we'll describe the difference between the two interaction styles, and explain how to correct resizing problems you might be encountering.
Read the rest of this entry »
Posted in Code, Power User, ShapeSheet | 2 Comments »
Posted by Visio Guy on 16th April 2008 - 1656 views

Many Visio users create detailed elevation drawings of network and audio/visual equipment. The quality of these drawings can impress customers and enable equipment to be more quickly recognized in a diagram.
While vendors such as Altima and D-Tools provide detailed Visio shapes, you may find yourself needing to create your own shapes from time to time.
One method for creating detailed equipment shapes involves tracing an image of the actual gizmo. We'd like to offer a few tips to help you get the job done in Visio!
Read the rest of this entry »
Posted in Development, Power User | 4 Comments »
Posted by Visio Guy on 15th April 2008 - 1288 views
Visio has tons of keyboard shortcuts, including modifiers for constraining the resizing and moving of shapes. For instance, with the Shift key depressed, you can constrain a shape to move only vertically or horizontally. Neat-o!
But unless I have totally missed something (which does occur occasionally), there is one feature that Visio could really use: the ability to resize shapes on-center.
Read the rest of this entry »
Posted in Illustration, Power User, ShapeSheet, Shapes | 4 Comments »
Posted by Visio Guy on 13th April 2008 - 1075 views
Whether you're a Visio end-user creating measured drawings, or you're developing a Visio solution with customized Visio shapes, at some point, you'll want to know how big your shapes are, and how to precisely resize them.
There are several ways to do this, and many of them allow you to edit the data as well. Today's post offers a run-down of the many ways that you can edit and view the size of your Visio shapes!
Read the rest of this entry »
Posted in Development, Power User, ShapeSheet | 2 Comments »
Posted by Visio Guy on 12th April 2008 - 1324 views
You can quickly create detailed shapes by importing images into Visio. If you don't have time (or budget!) to make a detailed drawing of that special ThinkPad or iPhone or USB Stick shape that you've been craving, you can simply browse for an image, and insert it into Visio!
It's a fairly simple matter that you can achieve via two ways: Choose the menu: Insert > Picture > From File... or: Copy an image from an image-editor or image-viewing program and paste it into a Visio page. Simple indeed!
But what happens to Visio file sizes when you import images?
Does Visio compress famously-large BMP files on import, or will the .vsd become huge itself? Will we get significant savings by importing JPG or PNG files as opposed to straight-bitmaps?
Well today, we ran a few tests to see what happens!
Read the rest of this entry »
Posted in Development, Power User | 6 Comments »
Posted by Visio Guy on 29th March 2008 - 1009 views
Recently we were introduced to the Cisco IP Telephone Shapes, and learned how they could be improved in the article: Making Shapes More Efficient: Using Fewer Shapes & Groups.
Today we're going to focus on what happens when the Cisco shapes get resized, and discuss a technique for making the lineweight proportional to the size of the shape.
Read the rest of this entry »
Posted in Development, ShapeSheet | 6 Comments »
Posted by Visio Guy on 28th March 2008 - 1146 views
You may have read our recent post on Cisco IP Telephone Shapes, and perhaps downloaded the shapes. While give-aways and freebies are nice, we at Visio Guy like to go further. We like look behind-the-scenes and talk about Visio development-related issues in order to give our readers a deeper understanding.
Before we released the Cisco IP Telephone shapes, we performed a number of tweaks to make them more efficient and better behaved. This article discusses a few of those operations--the whys and hows of making your shapes more efficient, and some tricks for ensuring proper resize behavior!
Read the rest of this entry »
Posted in Development, ShapeSheet | 3 Comments »
Posted by Visio Guy on 18th March 2008 - 2940 views

Today we’re going create a glass effect, using basic end-user features of Visio.
With a few simple techniques, you’ll be able to add pizzazz to your elevation drawings of windows, cabinetry, video monitors, rack-systems.
Now, maybe you’re thinking; Visio is not Adobe Illustrator, and Visio diagrams are supposed to be simple, boring, and utilitarian. A quick glance at this site might bring you to question that notion.
But don’t just take our word for it…
Update: You can now download a Visio drawing with samples shapes at the end of this article
Read the rest of this entry »
Posted in Development, Illustration, Power User, Shapes | 9 Comments »
Posted by Visio Guy on 17th March 2008 - 1504 views
If you're a developer, looking to create Visio-based solutions, then you're going to need to programmatically connect Visio shapes together. Wouldn't be nice to have a snippet or two to start from?
Today's post shows you VB and C# code that instructs Visio to connect every shape to every other shape, and to create a beautiful mess, like that shown in the image at left.
Read the rest of this entry »
Posted in Code, Development | 7 Comments »
Posted by Visio Guy on 4th March 2008 - 1394 views
The easy answer to this questions is: two. A single-shape can have two colors in its fill: a Fill Color and a Pattern Color.
If you want more, you have to group separate, differently-colored shapes together. In fact getting more colors is one of the major reasons that shapes become groups in the first place.
But if two were the actual answer, well, this article would over.
You see, Visio-Guy-friend Saveen Reddy has been up to his usual tricks of pushing Visio beyond the obvious and into the intriguing...
Read the rest of this entry »
Posted in Development, Illustration, Power User, ShapeSheet | 9 Comments »
Posted by Visio Guy on 3rd March 2008 - 1084 views
If you have a need to create repeating graphical elements, then learning how to create custom line patterns in Visio is absolutely essential.
Visio custom line patterns offer a power and flexibility that will save time for both your end-users and your solution development effort. And your final product will have a refined and elegant look.
Recently, John Goldsmith of Visual Signals, UK posted two excellent articles about creating custom line patterns in Visio.
Read the rest of this entry »
Posted in Development, Illustration | 1 Comment »
Posted by Visio Guy on 25th February 2008 - 1904 views

If you are busy developing a Visio solution, you might run into the situation where you need to edit a Visio master using code.
Like any application that has survived the ages, Visio has its share black-magic techniques that lurk in dusky corners of the netherworld. And if you need to edit masters programmatically, be warned! You're heading down a dark alley...
If you've already run into problems with this, don't feel bad. Even experienced Visio developers get tripped-up by this one! And that's because the correct way to do this isn't obvious, and the obvious way to do it isn't correct!
Read the rest of this entry »
Posted in Code, Development | 12 Comments »
Posted by Visio Guy on 8th February 2008 - 1758 views
Well the Microsoft Office Visio Conference 2008 has come and gone, and attendees enjoyed sharin' info, gettin' educated, and havin' fun.
Already, two sessions from the Developer Track have been posted by two intrepid conference presenters:
-- Chris Roth - Visio Solution Developer Pain Points
-- David Parker - Visualizing Information the Smart (Diagram) Way
Read the rest of this entry »
Posted in Development, Events | No Comments »
Posted by Visio Guy on 6th February 2008 - 1093 views
Whether or not you attended my session about the deep, dark secrets of Visio development today at the Microsoft Office Visio Conference 2008, you might be interested in the session materials.
Read the rest of this entry »
Posted in Development, Events | 1 Comment »
Posted by Visio Guy on 5th January 2008 - 3830 views

Getting text on a circle in Visio was always a pain until the Circular Text Generator (version 1) appeared on Visio Guy. V1 was evidently a big hit, but you wanted more! Version 2 adds some more control over text spacing and placement on the circle. So if you need to place Visio text on a circle, read on!
Read the rest of this entry »
Posted in Add-ins & Tools, Code, Illustration, ShapeSheet, Shapes | 7 Comments »
Posted by Visio Guy on 12th December 2007 - 2048 views
I've been playing with Visio 2007's new Data Graphics features more and more lately, and have been getting all sorts of ideas for new Data Graphics to share with Visio Guy readers.
One day, I was staring at the Ratings Data Graphic Item that ships as one of Visio's standard Data Graphic elements...
Read the rest of this entry »
Posted in Data, Humor | 2 Comments »
Posted by Visio Guy on 3rd December 2007 - 2864 views

Today's post, like the Visio Guy web-site, is all about creating smart graphics.
We're going to create an evergreen tree shape that fades as its size decreases. With this one single SmartShape you'll be able to illustrate an entire forest-scene that fades into the mist. And you won't have to format each tree individually.
You will learn how to cut Visio shapes into pieces and union the bits together to form new shapes. You'll learn how to add parameters to shapes, and fill them with Excel-like ShapeSheet formulas create sophisticated graphical behavior. And you'll create a context menu that resets the shape with a click of the mouse.
Read the rest of this entry »
Posted in Illustration, Seasonal, ShapeSheet | 7 Comments »
Posted by Visio Guy on 7th November 2007 - 2116 views
A Visio newsgrouper recently pointed out that in Visio, inserted images have a different default text position than normal shapes. For images, the text is located at the bottom of the shape, and text "grows" downward.
This makes sense, since you usually don't want the text to obscure the image. But perhaps you shape developers out there in Internet Land might wish to have the same text behavior for your shapes!
In this article, we'll discuss how to do it by hand, and offer some VBA script to get the job done faster!
Read the rest of this entry »
Posted in Code, Development, ShapeSheet | 1 Comment »
Posted by Visio Guy on 20th October 2007 - 1384 views

Visio 2003 has a defect in the LengthIU property of a Shape object. This article discusses the bug, describes a work-around, and offers Visual Basic code to help you get back on track!
Read the rest of this entry »
Posted in Code, Limitations & Bugs | 6 Comments »
Posted by Visio Guy on 18th October 2007 - 4784 views
OK, we've just about had enough! Between all the newsgroup posts, and John Marshall's nagging, it's time to do something about adding text to a circle in Visio. 'Til now, the standard response has been; "insert a Word Art object". But with Visio's SmartShape- and automation capabilities that just won't do! We ought to be able to build something cool--and more native to Visio. This article presents the first in a series of the Circular Text Generator! Read the rest of this entry »
Posted in Code, Illustration, ShapeSheet, Shapes | 20 Comments »
Posted by Visio Guy on 25th September 2007 - 4774 views
Multi-shape capability is one of the qualities that make Visio SmartShapes something special. A single shape can alter its appearance at the click of a context-menu, or the change of a data value.
While Visio shapes are often vector based, you can also create Visio multi-shapes using images. Using the simple panning-and-cropping technique described in this article will help you to quickly build efficient image-based Visio multi-shapes! So if you have a set of icons just aching to become a SmartShape, read on!
Read the rest of this entry »
Posted in ShapeSheet, Shapes | No Comments »
Posted by Visio Guy on 30th August 2007 - 2777 views
You may have noticed cool-looking, shiny ball shapes that pop-up now and again on Visio Guy. They have an attractive offset-radial fill effect, like the balls in the image on the left.
If you've played with Visio's Fill Format dialog, you'll know that good ol' Fill Pattern Number 40 will give you a nice-looking radial fill, but there doesn't seem to be a setting for getting it to be off-center. Well (once again) Visio Guy is here to show you how to work some black magic!
Read the rest of this entry »
Posted in Development, ShapeSheet, Shapes | 4 Comments »
Posted by Visio Guy on 27th August 2007 - 8003 views
Saveen Reddy works on security in the Microsoft Forefront team, and has a very interesting blog. He has no Visio-specific responsibilities within MS, but graphics and visualization are among his hobbies. This interest has produced some very interesting posts about Visio. Have a look, and enjoy!
Read the rest of this entry »
Posted in Development | 7 Comments »
Posted by Visio Guy on 24th August 2007 - 4225 views
A recent Visio newsgroup post asked about customizing the output files from Visio's Save As Web feature. This rang a bell in the ol' noggin, and I went searching for an old demo that exported a customized html page, with pop-up menus that displayed Custom Property (Shape Data) information.
Read the rest of this entry »
Posted in Code, Development, Drawings & Templates | 9 Comments »
Posted by Visio Guy on 24th August 2007 - 2394 views
A common question from budding Visio SmartShape developers is: "How do I get my text to resize with the shape?" Well, there are a few typical responses to that question, but this article focuses on a very simple method that you can use for text that does not change. So if you're building shapes with company logos, digital readouts, or something similar, then read on!
Read the rest of this entry »
Posted in Power User, ShapeSheet | 1 Comment »
Posted by Visio Guy on 21st August 2007 - 3066 views
We see quite often in Visio's newsgroups the question; "how do I get my font size to change with the size of my shape?" We'll tackle that issue with some nifty ShapeSheet formulas, and a bit of philosophizing. So pull up a chair and a warm cup of coffee...
Read the rest of this entry »
Posted in Development, ShapeSheet | 6 Comments »
Posted by Visio Guy on 16th August 2007 - 5848 views
If you are using Microsoft Forefront Client Security, and are documenting it in your Visio network diagrams, or if you dig Visio's new Data Graphics features, or simply like brightly-colored, shiny new Visio shapes and then we've got an article and a download for you!
Read the rest of this entry »
Posted in Data, Network, ShapeSheet, Shapes | 1 Comment »
Posted by Visio Guy on 29th July 2007 - 2378 views
Sure you can import bitmaps and images for use as Visio shapes. But imports are always rectangular, and they can have unappealing or distracting backgrounds that you'd rather not look at. While Visio doesn't have a masking capability or an irregular-cropping feature, there is a technique that will allow you to get the same effect!
Read the rest of this entry »
Posted in Development | 2 Comments »
Posted by Visio Guy on 23rd July 2007 - 2534 views
Whether you are a developer creating a Visio-based solution, or are a competent Visio user, David Parker’s excellent offering will help you push Visio 2007 to new limits!
Read the rest of this entry »
Posted in Development, Shapes | No Comments »
Posted by Visio Guy on 10th July 2007 - 1048 views

An associate asked me the other day; "how do you add a number of months to a date?"
I thought this would be simple, because the ShapeSheet supports elapsed-time units in addition to date and time formats. With elapsed-time, you can manipulate quantities of time, so the problem seemed fairly easy.
Well, not exactly... Read the rest of this entry »
Posted in ShapeSheet | 4 Comments »
Posted by Visio Guy on 3rd June 2007 - 3345 views
One of the areas in which Visio particularly shines is that of Sales Force Automation. With Visio, a rep can sit on-site with a customer, and visually spec out a system or an installation. The components in the Visio schematic can be linked to real product-data, and can be analyzed via code to generate bills-of-material and reports automatically.
On MSDN, I recently uncovered "oldie but goody" demo that shows off these capabilities. I created it for Visio 5.0, while I still worked for Visio Corp, and it still works with Visio 2003! The demo illustrates how a fictitious candy-manufacturing line might be laid out. Custom shapes represent general classes of equipment, and database links behind the shapes specify real-world items. With the click of a button, a Bill of Materials, is generated in an embedded Excel spreadsheet, sitting right on the page!
Read the rest of this entry »
Posted in Code, Shapes | 9 Comments »
Posted by Visio Guy on 25th May 2007 - 2510 views
If you've dabbled with the VBA project that resides in Visio documents, then you've likely stumbled upon the Document object's DocumentOpened event. This is a great place for running any initialization code that you might require, but there's a better way...
Read the rest of this entry »
Posted in Code | 2 Comments »
Posted by Visio Guy on 17th May 2007 - 4238 views
Macro security is an important topic for anyone who deals with automated Microsoft Office solutions. Since Visio and other Office documents can contain Visual Basic code that can perform potentially harmful operations, you need to understand a little bit about how to secure your system.
This article will inform you about the various security settings available forVisio 2003 and Visio 2007, so that you can more confidently enjoy the downloads and code samples that you'll find on Visio guy.
Read the rest of this entry »
Posted in Code | 10 Comments »