Author Topic: Adding Shapes to another Shape via ShapeSheet  (Read 6375 times)

0 Members and 1 Guest are viewing this topic.

drewdb

  • Jr. Member
  • **
  • Posts: 30
Adding Shapes to another Shape via ShapeSheet
« on: August 21, 2008, 06: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.

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2947
    • Paul Herber's website
Re: Adding Shapes to another Shape via ShapeSheet
« Reply #1 on: August 21, 2008, 07:02:07 PM »
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.

Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

drewdb

  • Jr. Member
  • **
  • Posts: 30
Re: Adding Shapes to another Shape via ShapeSheet
« Reply #2 on: August 21, 2008, 07:49:06 PM »
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?

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2947
    • Paul Herber's website
Re: Adding Shapes to another Shape via ShapeSheet
« Reply #3 on: August 21, 2008, 08:07:31 PM »
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/.
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.

Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

drewdb

  • Jr. Member
  • **
  • Posts: 30
Re: Adding Shapes to another Shape via ShapeSheet
« Reply #4 on: August 21, 2008, 08:19:25 PM »
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.

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2947
    • Paul Herber's website
Re: Adding Shapes to another Shape via ShapeSheet
« Reply #5 on: August 21, 2008, 08:25:44 PM »
No, there is a stencil file, electronics_package_sampler.vss

Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

drewdb

  • Jr. Member
  • **
  • Posts: 30
Re: Adding Shapes to another Shape via ShapeSheet
« Reply #6 on: August 21, 2008, 08:34:27 PM »
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.

drewdb

  • Jr. Member
  • **
  • Posts: 30
Re: Adding Shapes to another Shape via ShapeSheet
« Reply #7 on: August 22, 2008, 04: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.

mmulvenna

  • Full Member
  • ***
  • Posts: 91
Re: Adding Shapes to another Shape via ShapeSheet
« Reply #8 on: August 24, 2008, 03: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.