Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil

VISIO

    Sponsored Links

    Next

  • 1. How to Generate Database from ER Diagram
    I have installed Visual Studio .NET Enterprise Architect with Visio. I have generated an ER diagram and now need to forward engineer the model to a physical implimentation. But the "Generate Database" menu is missing. How do you generate the database? Thanks, Dave C
  • 2. Visio 2003 - Is text import removed?
    Visio 4, 5, 2000 and 2002 could automagically create great drawings (flow-charts) from text-files. Visio 2003 professional does not recognize the text-files my VC6 application creates :-( I there an available another not so hard technique my application can use to let Visio create my simple drawings? ; ex2_visio_import.csv Template, "Audit Diagram.vst" Shape,"1","Terminator","Start",,,,,,, Shape,"2","I/O","Some kind of input",,,,,,, Shape,"3","Decision","Test the input",,,,,,, Shape,"4","Display","Display true message",,,,,,, Shape,"5","Display","Display false message",,,,,,, Link,,"Next",,"1","2" Link,,"Next",,"2","3" Link,,"Result",,"3","4" Link,,"No result",,"3","5"

Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil

Postby google » Fri, 10 Mar 2006 12:19:04 GMT

i all. I've been banging my head against the wall here, and would
certainly appreciate a hand.

I'm working on a reasonably-sized org chart of 400 companies using the
Org Chart US Units template & stencil. The source is an Excel sheet
with a combination of entered text, numbers, and formulas. Some of the
columns are used to modify the appearance of the shape instance, for
example, if the parent company is A, then the outline is regular black.
But if it's B, then the outline is blue. Or if another value is C,
then the shape is a regular rectangle, but if it's D, the corners are
rounded to become a rectangle.

I've made a number of changes in the master shapes in the document
stencil. (In fact, I don't use the "official" stencil at all, and I
really wish I could make it stop loading and filling my document
stencil with shapes I don't want and haven't used each time I open the
diagram.)

Imports are done by erasing all shapes on the current page and running
Organization Chart --> Import Organization Data. Similar results occur
if the Master Shape is copied into a new document and the process is
repeated.

There's a fair bit of text in some of the shapes, so I want to increase
their size. In the Document Stencil's copy of the Master Shape of
Position, the formula for Height is SETATREF(User.Height). So I
changed User.Height from 0.5 in*DropOnPageScale to 1
in*DropOnPageScale. The master window shows exactly what it should - a
taller shape. When I save and update, none of the instances of
Position grow in height. Checking a ShapeSheet indicates the
User.Height cell still has the formula of 0.5 in*DropOnPageScale. This
doesn't update even after the shapes are re-imported or fiddled with in
the drawing window. (User.Width behaves similarly. I've set it to 1
in*DropOnPageScale in the ShapeSheet, but a random shape has the
formula of 1
in*IF(AND(GetVal(User.DocShowPicture),GetVal(User.ShowPicture),GetVal(User.HasPicture)),1.5,1)*DropOnPageScale
which is the stencil default.)

Another example: In the spreadsheet, there's a column specifiying the
layer membership. The formula evaluates to something like 0;3;5 for
membership in those layers. It goes into a ShapeSheet cell called
Prop.Layers as "0;3;5". In the Master's Layer Membership section, the
formula SETATREF(Prop.Layers) should set the shape's layer value at
creation or refresh. But picking a random shape shows that despite a
value of "0;3;5" in Prop.Layers, Layer Membership is simply "". The
View Layers dialog indicates there are 1072 shapes in layer 0 (and none
elsewhere), but Select By Type finds nothing when I ask it to locate
anything in layer 0.

(I've worked around this with:

Sub SetAllLayers()
Dim MyShape As Shape

For Each MyShape In ActivePage.Shapes

If MyShape.Master.Name = "Position" _
Or MyShape.Master.Name = "Manager" _
Or MyShape.Master.Name = "Executive" Then

MyShape.CellsSRC(visSectionObject, visRowLayerMem, _
visLayerMember).FormulaU = "Prop.Layers"

End If

Next MyShape

End Sub

but I don't want to depend on code, because someone would need to
remember to run it.)

Some things work fine. In FillFormat.FillForeground, I refer to
Prop.ocwiz_14, which contains an RGB function. In
LineFormat.LineColor, a combination of IF and STRSAME finds a value in
another cell and appropriately chooses a LineColor

Re: Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil

Postby Mark Nelson [MS] » Fri, 10 Mar 2006 14:45:03 GMT

he problem you are encountered has to do with inheritance between masters
and shape instances. When you drag out a shape from a stencil, you are
creating a shape instance from the master in the stencil. Initially all the
properties (i.e. Shapesheet cells) on the shape instance inherit their
values from the master shape. This means that if the cell in the master
shape changes, the cell in the shape instance changes too.

However, it is possible for the user (or the Org Chart application) to make
changes directly on the shape instance. Visio automatically changes the
PinX and PinY cells to match the position of the shape instance on the page.
If you change the fill or line color, those cells get changed on the shape
instance. Once a cell is set in the shape instance, that cell no longer
inherits from the cell in the master. Thus your master changes do not
propagate.

In your case, the Org Chart application is changing the User.Width and
User.Height cells as the shape instance is dropped on the page.

However, in the case of shape size and a few other settings, you can specify
what you want directly in the Organization Chart > Options dialog. No
master editing is required.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

< XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...



Re: Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil

Postby google » Sat, 11 Mar 2006 13:49:35 GMT

otcha. So the inheritance could either be taking place from my
modified shape and then the Org Chart app is overwriting it, or the Org
Chart gets its info from the "official" shapes and only some of my
modified shapes' properties come through after the fact. If the
latter, it seems impossible to predict which will work and which won't.
Quelle drag...

Either way, it looks like a code-based "cleanup" approach after the
import will be required. I want my end users to have to do as little
as possible, a sort of "step 1 -- import, step 2 -- click the magic
button" approach.

Thanks though Mark! Now I just need to ice my head. :-)

Neman Syed
neman@*YOUKNOWWHATTODOWITHTHISPART*istcd.com
http://www.istcd.com

Mark Nelson [MS] wrote:


Similar Threads:

1.Microsoft Visio templates - Stencil for Visio to create IT diagrams & network design

2.Modifying masters in a stencil

Dear All,

I would like to programatically modify a stencil by changing the name and
some properties of the contained master shapes. (The name I want to change
is the name that is displayed below each master in the stencil.)
This is to be implemented in a C# application. However, for testing I wrote
the VBA macro below.

The macro works fine if the stencil is open for editing (mouse click onto
the top left corner of the stencil, then click "Edit").

Question: How can I enter a stencil's edit mode programatically? I tried
this via the AllowEditing flag or by closing and re-opening the stencil with
the 'visOpenRW' flag. Unfortunately, both did not work. I found several
newsgroup threads concerning this issue, but none of them really helped me.

Thanks a lot in advance for any hint!

Best regards,
Markus


Public Sub UpdateStencil()
    Dim myStencil As Document
    Dim myMasters As Masters
    Dim myMaster As Master
    Dim myMasterCopy As Master
    Dim myShape As Shape
    Dim index As Integer
    Dim win As Window

    On Error Resume Next

    Set myStencil = Documents("My Stencil.vss")
    myStencil.Title = "New Title"
    Set myMasters = myStencil.Masters
    For index = 1 To myMasters.Count
        Set myMaster = myMasters(index)
        Set myMasterCopy = myMasters(index).Open
        Set myShape = myMasterCopy.Shapes(1)
        myMaster.Name = "New Name"
        myShape.Cells("User.ELEMENT_ID").Formula = 12345
        myMasterCopy.Close
    Next index
    myStencil.Save
End Sub



3.Modify selection of masters in stencil?

Hi!
I have a C# application hosting a Visio ActiveX control. The
application enables the user to create new masters (programatically).
However, when a new master is created (using Stencil.Drop()), it gets
selected, in addition to the already selected masters.
I know I can get the currently selected masters list from the windows
of the stencil, but is there a way to modify this selection?

Thanks,
Gil

4.Export to Excel, then to Visio (Org Charts)

I am trying to export my database to into Visio so I can automatically create 
org charts. I am having a problem with the names. 

If I have a contact named John Smith, Outlook exports the name as SmithJohn 
in the name field. That is what Visio keys off of (manager name) to figure 
out how to organize the org charts. I am trying to figure out how to export 
the name normally. I have changed the file as setting and it does not do 
anything. 

If I go in the file and manually change the name to John Smith, the org 
charts work perfectly. 

Anyone have any ideas?
Below is an excerpt from my file.

Name	               FirstName1	    LastName1	  JobTitle          ManagersName1
WhitacreEd	              Ed	Whitacre	  President & CEO	
CicconiJames	           James Cicconi	          VP                      Ed 
Whitacre
StephensonRandall	Randall	Stephenson	COO	                Ed Whitacre

Thanks,
Lamichael


5.visio org chart using excel spreadsheet

I followed the instructions and created my org database and my new org chart. 
 However, one person reports to two manager so I need to create a dotted line 
second connection.  Can that be done using the excel spreadsheet or must I 
add it to the org chart when completed?
-- 
Nancy

6. Visio crashes when exporting Org Chart to Excel

7. Mulitple level (4 level) visio org chart from excel - possible

8. Link Excel Spreadsheet to Visio Org Chart...how?



Return to VISIO

 

Who is online

Users browsing this forum: No registered users and 23 guest