G
Hi 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 for the shape.
There are others too. Modifying the master, e.g. rotating the shape,
causes all shapes on the sheet to rotate as well, so there is a
definite link remaining.
Auuuuuggghhh!!!!
Thanks in advance!
Neman Syed
neman@*YOUKNOWWHATTODOWITHTHISPART*istcd.com
http://www.istcd.com
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 for the shape.
There are others too. Modifying the master, e.g. rotating the shape,
causes all shapes on the sheet to rotate as well, so there is a
definite link remaining.
Auuuuuggghhh!!!!
Thanks in advance!
Neman Syed
neman@*YOUKNOWWHATTODOWITHTHISPART*istcd.com
http://www.istcd.com