IT tutorials
 
Office
 

Developing Custom Microsoft Visio 2010 Solutions : Creating SmartShapes with the ShapeSheet (part 4) - Linking Subshape Text to Shape Data Fields

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Product Key Free : Microsoft Office 2019 – Serial Number
4/17/2014 1:51:34 AM

Linking Subshape Text to Shape Data Fields

By linking the size and position of the subshapes to user-defined parameters, our notes shape behaves graphically correct when resized. Now we need to attend to the text. The text in the Box should be linked to a number field in the group. In the next exercise, you create a Shape Data field in the Group shape, then refer to it from the Box to create data-linked text.

Linking Shape Data to Text on a Subshape
1.
Create the Number field for the notes shape. Right-click on the Group shape and then choose Data, Define Shape Data. In the dialog, set both the Name and the Label fields to Number. Choose a data type of Number in the Type field, as shown in Figure 8.

Figure 8. Creating the Number field.


2.
Open the ShapeSheet for the Group. Scroll down until you see the Shape Data section. You should see one row, with the row name Prop.Number. Number is what you typed in the Name field in step 1. Prop comes from the fact that Shape Data fields used to be called Custom Properties. You should also see Number in the Label cell. The value for the Type cell should be 2, which corresponds to the number data type you chose in the dialog.

3.
Double-check the name of the Group. If you are working with a copy of the shape, it might have a different ID than Sheet.3. Select the Group and then click Shape Name on the Developer tab. Make a note of the ID.

4.
Link the text of the Box shape to this new field. Subselect the Box and then press F2 to change to text edit mode. Remove any text that might be in the box.

5.
From the Insert tab, click Field in the Text group. Notice that Shape Data is selected, but the list of fields on the right is empty. The reason is that the Box doesn’t have any Shape Data. The Number property belongs to the group. Visio isn’t clever enough to offer parent shapes’ Shape Data fields for you to insert, so we have to do a bit of extra work

6.
Click Custom Formula at the bottom of the Category list. The Custom Formula text box just below becomes active.

7.
In the Custom Formula text box, start typing the sheet ID for the group. While your group is probably named Sheet.3, the shape in Figure 9 has an ID of 16 just to illustrate that ids can be different. As I start typing Sheet.16, and then type an exclamation point, see how IntelliSense pops ups and helps with possible cells in the group’s ShapeSheet? You can continue typing “Prop” and the possibilities narrow to just Sheet.16!Prop.Number.

Figure 9. Linking subshape text to the parent group’s Shape Data by inserting a custom field.

8.
Once the whole formula is entered (=Sheet.16!Prop.Number), click OK. The subshape’s text should now be linked to the field. (Remember, your formula might have been =Sheet.3!Prop.Number.)

9.
Show the Shape Data window if it isn’t visible. The easiest way is to right-click any shape and then choose Data, Shape Data.

10.
Select the notes shape and then change the value of the Number field. The text in the Box should update.

11.
Subselect the box and open its ShapeSheet window. Scroll down until you see the Text Fields section. You should see one row, with a Value cell that shows the same Sheet.16!Prop.Number (or Sheet.3...) formula that you just entered in the dialog.

 
Others
 
- Developing Custom Microsoft Visio 2010 Solutions : Creating SmartShapes with the ShapeSheet (part 3) - Controlling Grouped Shapes with the ShapeSheet
- Developing Custom Microsoft Visio 2010 Solutions : Creating SmartShapes with the ShapeSheet (part 2) - Creating Smart Geometry in the ShapeSheet
- Developing Custom Microsoft Visio 2010 Solutions : Creating SmartShapes with the ShapeSheet (part 1) - Introducing the ShapeSheet
- Developing Custom Microsoft Visio 2010 Solutions : Introducing the Notes Shape, Using the Developer Ribbon Tab
- Microsoft Excel 2010 : Working with Graphics - Inserting Clip Art, Inserting a Picture from File
- Microsoft Excel 2010 : Working with Graphics - Using Drawing Tools
- Microsoft Excel 2010 : Automating Repetitive Tasks by Using Macros - Running Macros When a Workbook Is Opened
- Microsoft Excel 2010 : Automating Repetitive Tasks by Using Macros - Running Macros When a Button Is Clicked
- Microsoft Excel 2010 : Automating Repetitive Tasks by Using Macros - Creating and Modifying Macros
- Microsoft Excel 2010 : Enabling and Examining Macros (part 2) - Examining Macros
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us