Visio Stencils.

A

Andy

Hi,

Using Visio Professional 2003.

I have visio stencil which denotes a patch panel.

I want to be able to change the ports, which are currently white to another
colour, red.

As it stands nothing I've tried has changed the colour, however if I ungroup
the stencil twice I'm able to select the individual ports and change the
fill colour. the trouble of doing this is that firstly the object is
ungrouped and second it no longers snaps to other objects such as racks.

Any ideas how can restore the orginal stencil after its been ungrouped ?

Thanks in advance.
 
A

Al Edlund

You've run into one of the challanges of working with shapes that are groups
and wanting to do some status reporting. What I ended up doing was when the
shape is dropped onto the drawing I first update the shape and it's members
with something like this..


' this is where we set it up so that the outline color reflects the layer
selected
' we end up forcing the line style and color just so the object is
aware......
' we considered using pointers in shapes but rather decided to work with
layers.

Private Sub subNetworkStatusAware(visShape As Visio.Shape)

Dim shpCell As Visio.Cell
Dim visEmbShape As Visio.Shape

Set shpCell = visShape.CellsSRC(Visio.visSectionObject, visRowLine,
visLineColor)
shpCell.Formula = visBlack
Set shpCell = visShape.CellsSRC(Visio.visSectionObject, visRowLine,
visLinePattern)
shpCell.Formula = visSolid
If visShape.Type = visTypeGroup Then
'Debug.Print "it is a group"
Set visEmbShape = visShape.Shapes(1)
'Debug.Print "instantiate an embedded shape"
Set shpCell = visEmbShape.CellsSRC(Visio.visSectionObject,
visRowLine, visLineColor)
shpCell.Formula = visBlack
Set shpCell = visEmbShape.CellsSRC(Visio.visSectionObject,
visRowLine, visLinePattern)
shpCell.Formula = visSolid
Set shpCell = visEmbShape.CellsSRC(Visio.visSectionObject,
visRowLine, visLineWeight)
shpCell.Formula = 0.02
End If


End Sub


The second piece is that the topology page has several layers (available,
unavailable, unknown, etc) which are color keyed (green, yellow, red,
etc..). After checking the devices status, I move it to the appropriate
layer and which forces a 'color' change. Part of the reason for doing this
is to allow the user a certain amount of control for format and printing.

Al
 
M

Mark Nelson [MS]

Also instead of ungrouping, you may just want to edit the subshapes within
the group(s). Go to Edit > Open Group to get at the subshapes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top