Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: drewdb on August 21, 2008, 11:18:19 PM

Title: Adding Shapes to another Shape via ShapeSheet
Post by: drewdb on August 21, 2008, 11:18:19 PM
First, thanks to everyone on this site for all of your help.

Would anyone know if it's possible to have a shape let's say a rectangle and via the ShapeSheet, be able to add another 4 smaller rectangles to it when the user right clicks and selects the "Add 4 Rectangles" action.

I am trying to create some smart shapes in the Audio Visual Industry. I would like to have 1 master with lets say 1 main rectangle (the device) that is divided by 2 vertically with smaller rectangles on each side that represent the number on inputs to the left and outputs to the right. All AV devices have different amounts and rather than creating each one individually and having a huge library, i would like the user to be able to select how many Outs and Ins from the one Master.

I though of creating 1 with say 20 smaller rectangles (20 Inputs/20 Outputs) and showing or hiding and whilst this is OK, i hope i can be more dynamic with it as when the user moves the shape, the overall size is still the bigger even if it only has 2 Ins and Outs.

Thanks again.
Title: Re: Adding Shapes to another Shape via ShapeSheet
Post by: Paul Herber on August 22, 2008, 12:02:07 AM
It might be worth looking at creating the 20 inputs/outputs as individual geometry sections rather than separate shapes that get grouped. The geometry sections can be made independantly visible/invisible and any connection points could also be made visible depending upon the geometry section's visibility.

Title: Re: Adding Shapes to another Shape via ShapeSheet
Post by: drewdb on August 22, 2008, 12:49:06 AM
Thanks for your input Paul,

I've worked out how to add Geometry and draw the smaller recs that i need but i also need to be able to put text in each rectangle and allow the user to edit this text based on the type of Input/Output.

Is this still possible by doing it this way?
Title: Re: Adding Shapes to another Shape via ShapeSheet
Post by: Paul Herber on August 22, 2008, 01:07:31 AM
Ah, that might be difficult as a shape can only have one text block.
However, the concept of having a grouped shape might not be too bad. I have stencils containing grouped shapes with a large number of component shapes. There is an example grouped shape containing 70 components in the sample zip file at http://www.electronics-packages.sandrila.co.uk/ (http://www.electronics-packages.sandrila.co.uk/).
One shape (not in the samples) is a 144 pin chip, I've just tried that on a 6 year-old machine running Visio 2003 and the shape graphics are fine even on a fairly old machine.

Title: Re: Adding Shapes to another Shape via ShapeSheet
Post by: drewdb on August 22, 2008, 01:19:25 AM
Thanks again Paul,

I've downloaded the samples and maybe i'm missing something. I found a text file that has some config info and i assume that the shape can be configured from this?

I can't find anything on the shapesheet.

I would also need to resize the height of the shape depending on how many ins and outs have been added. i don't think this would be that hard but adding or subracting sub-shapes is for me.
Title: Re: Adding Shapes to another Shape via ShapeSheet
Post by: Paul Herber on August 22, 2008, 01:25:44 AM
No, there is a stencil file, electronics_package_sampler.vss

Title: Re: Adding Shapes to another Shape via ShapeSheet
Post by: drewdb on August 22, 2008, 01:34:27 AM
Sorry, i meant that when i drag n drop a shape from this stencil onto my drawing, i'm trying to find out how it can add or remove parts of the shape. i'm assuming that these shapes can do this.

I might be wrong, but this is what i would need i believe so that my shapes can add or remove the Ins/Outs as required.

I appreciate your time and effort.
Title: Re: Adding Shapes to another Shape via ShapeSheet
Post by: drewdb on August 22, 2008, 09:57:37 AM
For anyone else who may be wondering?

It doesn't look like i can do what i need with the shapesheet alone so i've achieved this with VBA.

Works well and is completely dynamic but i was hoping to do everything with the shapesheet to avoid the "enable macros" on each users machine.

Anyway. Thanks again.
Title: Re: Adding Shapes to another Shape via ShapeSheet
Post by: mmulvenna on August 24, 2008, 08:59:18 PM
Go to the tools menu and then the trust center. You can set specfic location(s) to trust so that the "enable macros" does not come up.