How To Add Another Item In Visio Template

And the more yous larn almost Visio'southward capabilities, the more you'll want to control shape text. Oh yeah, you'll want to rotate information technology, reposition it, evaluate information technology, make it reflect information, make information technology resize with the shape, and much, much more.
Today we accept a treatise on twelve text tips for both end-users and ShapeSheet fans.
The Height Twelve Tips
This list could accept easily been twenty-2 tips long, just we had to trim. In today's summit-twelve Visio text tips, we'll address these problems in moderate detail:
- Using the text block tool to reposition text on a shape
- Quick text-editing using F2 to go into text-edit mode
- Setting double-click to edit the text of a shape
- Linking shape data fields to shape text
- Keep text on the level
- Find out: how big is your text block?
- Evaluate shape text as input information
- Comparing strings in the ShapeSheet
- Gravity text
- Process and manipulate lists of values with lookup and indexing functions
- Resize font with shape
- Reposition text with a control handle
i. The Text Block Tool
Just as you can motility and rotate a shape relative to the page or to a group, you tin can movement a text block relative to a shape! The text block is the conceptual rectangle that holds a shape's text. It tin can be moved and rotated independently of the shape.
Sitting at the top of the Standard toolbar, but below the large black A is the the Text Cake Tool. You have to click the little drop-downward triangle to become at it, like this:
Give it a try. Note: some shapes take protection and guarding that prevents you lot from doing this, so practice on uncomplicated shapes that you yourself have drawn until you become familiar with the tool.
ShapeSheet junkies will want to know that changes y'all make with the Text Cake tool are reflected in the Text Transform section of the ShapeSheet.
2. F2 Enters Text-edit Style
Certain it'south like shooting fish in a barrel to select nigh Visio shapes and but get-go typing. Merely sometimes you desire to edit text that is already in that location, and double-clicking doesn't ever get you into text-edit manner.
For these cases, F2 is a shortcut that volition get you into text-editing mode. Simply select a shape and press F2, and your shape's text will get highlighted–ready and waiting for y'all to edit it.
Escape (Esc) will get yous out of text-edit fashion.
3. Setting Double-click to Edit Text
When you draw a elementary rectangle or circle, the default double-click behavior is to enter text-edit manner. Merely if you depict a grouping, so double-clicking volition probably just sub-select one of the group's sub-shapes.
If y'all have text-heavy drawings with lots of text-containing shapes, y'all might want to prepare all shapes so that double-clicking enters text edit mode.
This is really easy to ready. All you demand to do is:
- Select a agglomeration of shapes
- Get to: Format > Behavior > Double-click tab
- Check the radio button: Edit shape's text
- Click OK
Inside of the ShapeSheet, an event cell will receive a new formula. It looks like this:
EventDblClick = OPENTEXTWIN()
So if you lot're making automation tools that prepare this behavior automatically, just gear up the EventDblClick cell!
iv. Link Text to Shape Data Fields (Custom Properties)
If you want to display data stored behind your shape in the shape's text, information technology'south as easy every bit inserting a field. Here's the short list of what to do:
- Select a shape that has shape information fields, like the ThinkPad shape shown below
- Hit F2 to become into text-edit mode (like in tip #2!)
- Go to: Insert > Field
- Select Shape Data or User-divers cells (or other info about the shape or document) in the Category column
- Cull the info you want and specify formatting
Yous can insert more than than i field by moving the text-edit cursor around and going back to the Field dialog. Y'all tin can besides enter custom ShapeSheet-valid expressions if you don't notice what you lot need in the pre-defined set of fields.

5. Level With Your Text!
Sometimes y'all desire your text to stay level — that's correct-side-upwardly and readable without neck hurting — no affair how the user rotates those darn shapes. For instance, if you rotate a shape that has "normal" or default text, you'll get something that looks like this:


We've already mentioned that the Text Cake tool causes changes to cells in the Text Transform section. Well one of those cells specifies the angle at which the text is rotated, relative to the shape: TxtAngle.
The easiest make text anti-rotate is to get information technology to compensate for any rotation of the shape past anti-rotating the text. The expression is pretty simple: but make the text rotate in the opposite direction as the shape:
TxtAngle = -Angle
Your shape rotates, your text anti-rotates. Pretty simple.
But, if your users get catchy, they might flip the shape, which will break this formula. A more robust version looks like this:
TxtAngle = IF(BITXOR(FlipX, FlipY), Angle, -Angle)
One note well-nigh the Text Tranform section. If your shape's text block is default–ie: it hasn't been manipulated, then yous won't see the department in the ShapeSheet. Oddly, you accept to add information technology (every bit opposed to evidence it) merely this is merely a thing of going to Insert > Section, and checking the Text Tranform box.
half-dozen. How Big is Your Block?
It'due south very helpful to know only how big your text block is. Two lovely ShapeSheet functions volition aid you become there: TEXTWIDTH and TEXTHEIGHT.
They don't have to live in the TextTransform department, but they're oft found there:
TxtWidth = TEXTWIDTH(TheText)
TxtHeight = TEXTHEIGHT(TheText, TxtWidth)
Normally, TxtWidth and TxtHeight are every bit big as the shape itself, but if you lot desire to position text tightly against an border of the shape, and have it react to any text the user might input, and then you'll desire to learn these formulas.
The formulas shown to a higher place volition cause your text to tightly enclose any text you type on the shape, plus the height, lesser, left and right margins. With these formulas, you tin position text exactly against an outside edge of the shape.
So, for instance, to identify text on the right side of a shape, you lot could set the TxtPinX prison cell as follows:
TxtPinX = Width + TxtWidth/ii
As the text grows, TxtWidth will abound, and the text will move off of the edge of the shape (the text's pin is in the centre of the text)
Similarly, you lot can position text off of the bottom of the shape like this:
TxtPinY = -TxtHeight/ii
Note that the last two examples assumed that the text's pivot was at the center of the text block. This is handy if you lot are likewise going to implement anti-rotating text.
Merely if your shapes will always be correct-side up, y'all can practise some simplification by playing with the TxtPin and the TxtLocPin. The TxtPin is the position at which the text block is located, relative to the shape. The TxtLocPin is where that pin is located within of the text cake itself.

I know, it'due south a bit cumbersome to describe with…erm…text, then effort information technology out for yourself!
7. The Value of Words
The text on your shapes can be more than just a bunch of pretty characters. It can specify meaningful quantities.
As long as the text adheres to valid ShapeSheet syntax, then it tin be validated. Now I know that "valid ShapeSheet syntax" sounds ominous and daunting, but it doesn't expect much different then, say, Microsoft Excel formula syntax. So this won't be annihilation new to lots of y'all.
To convert shape text to numbers, you use the EVALTEXT function. It will try its very best to make numerical sense out of the text you blazon. For instance, this formula:
Width = EVALTEXT(TheText)
Will crusade your shape to grow in width to the size of whatever your shape'due south text evaluates to. The obvious danger is that your text volition evaluate to zero (ie, you type: "Schmoosabbfgrfflk") and your shape will disappear! But it is still a pretty absurd feature, plus y'all can use IF statements to trap zero evaluations.
You tin can easily endeavour this out by doing this:
- Describe a rectangle on a page
- Blazon "1.5" or "25mm" or something in the shape'southward text (so our shape doesn't disappear in footstep four!)
- Open up the ShapeSheet via: Window > Show ShapeSheet
- In the Width cell, enter the formulas shown to a higher place
- Close the ShapeSheet window, and start typing on your shape
Now have some fun. Effort typing: Sin(45deg) + PI()^2 – 3417-iv/9, or something equally obscure.
As long equally the text is valid ShapeSheet syntax, then you lot'll get an evaluation. If you don't type in any units, and then the result will be in inches, merely you should be able to type mm, m, cm, in, yd, etc. too as formulaeic expressions.
You can build a scientific calculator with just ii shapes: i shape takes your input, the other displays the output. And the output evaluates every bit yous type! This is described in detail in this commodity: Evaluate Shape Text With EvalText
8. Comparison Strings
A lot of people jump head-first into the ShapeSheet, merely to surface minutes later in the newsgroups. They prepare a shape with Shape Data fields similar "Color" and let values such as "Red", "Blue" and "Pinkish".
So they try to make decisions on these named values and format the shape appropriately. They attempt stuff like:
FillForegnd = IF(Prop.Colour = "Red", RGB(255,0,0), …)
And it doesn't work!
The problem is that Visio evaluates text as best every bit it can. So "Red" = "Red", only "Red" = "Blue" too, because they both evaluate to ZERO!
If you want to compare strings, you need to apply the STRSAME( ) function, which was added in Visio 5.0 (I retrieve). Here's an example:
FillForegnd = IF( STRSAME( SHAPETEXT( TheText ), "Cherry-red", Truthful), 2, 0 )
This volition turn your shape red if you type "Red" or "red" into the shape. Pretty cool, huh? Annotation, the TRUE argument is optional, and allows for case-sensitivity. TRUE ignores case, and FALSE respects it.
9. The Gravity of the State of affairs
If y'all've got lots of shapes on a page, and they are rotated at arbitrary angles, then the drawing tin get visually confusing, very apace. Sure, yous could try the anti-rotate technique from tip #five, but sometimes text should orient along the shape.
Have a look at this mess:

Run across how the text "points" in all directions? It is very jumbled to look at.
Now take a gander at this:

This effect is achieved using the GRAVITY ShapeSheet function, which essentially rotates the text 180 degrees, under certain conditions.
The shapes in the second case use the GRAVITY function in the TxtAngle prison cell as follows:
TxtAngle = GRAVITY(Angle, -threescore deg, 120 deg)
What happens is that TxtAngle is 0 deg between -60 and 120 deg, just flips 180 degrees for angles not in the range. Your text stays in-line with your shape, but is readable from the bottom or correct-side of the folio. That'due south a lot less turning and flipping of the page, and less hurting in your neck as well!
An illustration that was recently posted in Happy Pi Mean solar day…Sort Of, shows how GRAVITY effects text as a shape is rotated:

10. Process Lists With LOOKUP and INDEX
If you desire to piece of work with lists of values then Visio's ShapeSheet provides the LOOKUP and Alphabetize functions to help yous out.
Oft times you need to know where an item is in a list, or call up a specific item from a list.
LOOKUP tells you where an item is in a list. And then LOOKUP("three","one;two;3;four") returns 2, every bit the list positions are nix-based. If the start argument isn't in the list, the function returns -1. Notice that you tin use LOOKUP to do text comparisons also, if you are into code obfuscation.
INDEX tells you the "Nth" particular in a list. So INDEX(ane,"one;2;3;four") returns "two".
By default, the semi-colon is the ShapeSheet'south listing-separator of choice, merely both functions have optional arguments that allow yous specify a custom listing-separator.
We tin highlight both functions in a text-translation instance. We've got ii lists of numbers: one in English language, one in German. Using LOOKUP and INDEX, we tin can get the German language value, given the English
User.numsEN = "cypher;one;two;3;iv;five;six;seven;eight;nine"
User.numsDE = "naught;eins;zwei;drei;vier;fünf;sechs;sieben;acht;neun"
User.valEN = "five" …this could come from ShapeText, or a Shape Information field, for example
User.valDE = INDEX(LOOKUP(User.valEn, User.numsEN), User.numsDE)
Equally long equally the lists match up, this will piece of work. We become a number that indicates where User.valEN is in the list of English numbers. This index is then used to grab the German equivalent. And so: "v" gives us an index = iv, which then points to "fünf"
11. Resize Font With Shape
ShapeSheeters often ask how to get their text to resize with the shape. Normally, font-size is independent of shape size, but sometimes text should deport less like information and more like graphics.
So the technically re-worded question is: "How do you get font size to change with shape size?"
The easiest style to do this is to build a ration between the current height of the shape and the original tiptop of the shape, and multiply that by the original font size. The formula tin live in the Char.Size jail cell and might expect something similar this:
Char.Size = 12pt * Meridian / 0.75 in
Here, 12pt is the original font size, and 0.75 in is the original height of the shape. The expression will increase or decrease with the current Height of the shape, and the font size will correspondingly grow or compress. You might desire your text to react with the Width of the shape, or some combination of Summit and Width.
There are lots of other factors to consider too, so luckily you can read the whole story here: Text Resizing with ShapeSheet Formulas
And if you take text that won't exist edited, you lot can utilise this technique: Resize Text With Metafiles!
12. Reposition Text With Control Handles
Lots of Visio shapes come up with a feature that lets you easily reposition text using a little, yellow control handle. You tin come across information technology in action on this ThinkPad shape. See the yellow diamond peeking out from behind the cursor cross-hairs?
The trouble that offset shape developers have is that they endeavour to hook a control handle to the text. But the image is actually the contrary of this: you hook the text (location) to the (position of the) control handle.
Since this topic warrants a full commodity (and several utilities, probably), I"ll briefly draw the process of getting text to be repositionable via a control handle.
First, you lot add a command handle by inserting a row in the ShapeSheet. Then you set the TxtPinX and TxtPinY cells to refer to the position of the command handle. At present, when y'all move the piddling yellow diamond, your text will follow along!
In item, it goes something like this:
- Create or select a shape (duh!)
- Open the ShapeSheet via Window > Show ShapeSheet
- Go to: Insert > Section and check Controls and Text Transform (if it isn't grayed out)
Y'all should now encounter both the Controls department and the Text Transform section in the ShapeSheet. - In the Text Transform section, set the TxtPin cells as follows:
TxtPinX = Controls.Row_1.10
TxtPinY = Controls.Row_1.Y - In the drawing window, reposition the control handle to a suitable default position. The text should follow along!
- Employ other text-handling techniques to the text block, as discussed in the other xi items in this article!
Simply Await, There's More!
Well, that'south all we take time for this century today. Merely you'll be glad to know that Visio Guy is choc-full of text-related articles. If yous've had fun with our Elevation Twelve Text Tips, then I urge y'all to read these:
- Evaluate Shape Text With EvalText
- Brand Your Text Stand Out!
- Round Text Generator (version 2)
- Circular Text Generator (version 1)
- Text to the Bottom of the Shape
- Resize Text With Metafiles!
- Text Resizing with ShapeSheet Formulas
- Month Math
How To Add Another Item In Visio Template,
Source: http://www.visguy.com/2009/05/06/top-twelve-text-tips/
Posted by: codytherintord.blogspot.com

0 Response to "How To Add Another Item In Visio Template"
Post a Comment