News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Adding Shapes to another Shape via ShapeSheet

Started by drewdb, August 21, 2008, 11:18:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

drewdb

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

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 for Visio -

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

drewdb

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

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 for Visio -

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

drewdb

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

No, there is a stencil file, electronics_package_sampler.vss

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

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

drewdb

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

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

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.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 279 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1144KB.
Tokens: post-login.
Cache hits: 13: 0.00221s for 26,750 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]