Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: KyleL on October 01, 2017, 08:57:38 PM

Title: Multi-Shape with crop-ability and automatic resize
Post by: KyleL on October 01, 2017, 08:57:38 PM
Hello,
I'm looking for some help on creating a multi-shape from many "foreign images" (200+). I've used the shape sheet to create a menu on this grouped multi-shape to select a specific image. The shapes range in different sizes and this causes the drawing canvas to always expand to the largest shape. Is there a way to shrink the effect on the canvas to the selected image size? I have tried NoObjHandles, NoCtlHandles, NoAlignBox, etc.. but they dont seem to remove this effect.
The use of the crop tool on selected images is needed as well, but that function seems to disappear when more than one image is grouped. Does anyone have any suggestions that don't require coding?
I have no experience other than what I've picked up on hiding images and would greatly appreciate some help/direction to the right posts.
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: Yacine on October 01, 2017, 09:57:54 PM
Try inserting the images as fill paterns.
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: Nikolay on October 01, 2017, 10:21:16 PM
I would suggest you make your images same size first. And then insert.

For making images same size, you could use for example a a wonderful imagemagic (https://www.imagemagick.org/script/index.php) command line tool.
If there is something that can be done with an image, then that tool can do it. In particular, here are options (https://www.imagemagick.org/Usage/resize/#resize) for reisze
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: KyleL on October 02, 2017, 08:14:50 PM
To Yacine,
Would I have to insert the images as fill patterns before grouping them into a multi-shape? Does this change the foreign image to a different format that has different shape properties?

to Nikolay,
I cannot make the images the same size because I need them to be different sizes. For example, I tried to create a multi-shape for a pipe in small, medium and large lengths in horizontal and vertical orientation. All the pipes have to be the same scale so they fit together in a piping system.
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: wapperdude on October 02, 2017, 08:36:43 PM
What is the end goal of all of this?

200+ images can be somewhat large file. 

Yes, grouping will not allow cropping.

Wapperdude
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: KyleL on October 02, 2017, 08:48:14 PM
Once a system is drawn I convert it to a png file and use is as a "background" in a building controls automation system. I could be wrong but I believe this conversion only takes the visible images into account for the final png size?  I am just looking for a quicker more efficient way of selecting images from a stencil and thought that creating a multi-shape might work. I would also have more flexibility in adding/changing color to the system if required for a different project without redrawing as much.
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: Yacine on October 02, 2017, 09:14:13 PM
Hello KyleL,
When I suggested using fill patterns, I overlooked that you want to avoid coding and what you answered to wapperdude, makes me even more curious about the whole final image (building controls system, pipes of different sizes, changing the colour of the system, etc.).

I do similar stuff (P&IDs), where I configure smartshapes to the needed configuration.

Could you please upload a sample drawing, showing also specially the images you want to use?
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: KyleL on October 02, 2017, 09:44:22 PM
The picture in example 1 shows what happens when I convert my final drawing to png. I get that empty white space at the bottom or side of the background. Example 2 shows the "box" that I cant get rid of that creates that white space. Normally I would crop the red pipe to sit just behind the magenta pipe ninety for a specific length. I suppose I could try some coding but I would probably need some extensive instruction as I have never done any and have no idea how to start.
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: KyleL on October 02, 2017, 09:54:00 PM
The following example picture is what I did to make this multi-shape
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: Yacine on October 02, 2017, 09:54:48 PM
Pardon me if I say, that the idea is crazy.
You're trying to use snapshots of pipework from a 3D CAD program as shapes.

Why crazy?
- @200 shapes to insert, the system becomes impossible to maintain. Trust me, I've done the mistake once. The work load is so heavy that you will never find again the time to rebuild the library when it is required.
- the snapshots are difficult to do "right" as your pictures show (angle, size, ...)
- the pictures cannot be formatted later (e.g. changing pipe colours)
- the system will be very heavy because it is carrying raster data.
- you need to consider every pipe configuration, thus the high number of pictures.

Solution?
Depending on the goal (realistic versus schematic drawing) there are different solutions.
1) shematic.
Junichi Yoda (member of the forum) did quite nice work with isometric shapes. Some years ago I used his work to prepare my own library of isometric fittings. I'll try to find them. The system was reduced to 1 master shape to configure.

2) realistic
By the use of line patterns and line ends, you can setup a pipe master that can be configured to show the same complexity as the schematic solution - probably more difficult to draw and more difficult to modify for isometrics.

Let me know if isometrics is desired.

Give some time to prepare some drawings to show.

Rgds,
Y.
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: wapperdude on October 02, 2017, 09:57:02 PM
Another question...

Is it necessary to do this in 3-D, say isometric view, or is flat 2-D adequate?

There's a lot you can do with smart shapes, e.g., one 90Deg Ell that can be set for different diameters.  Likewise pipes both diameter, length.  One shape could cover most / all variations.  You could also build in coloring.

Wapperdude
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: KyleL on October 02, 2017, 10:10:14 PM
Unfortunately, I need to use these shapes to create the required graphics. My co-workers said I was crazy for trying this as well, lol.. I normally save a visio file once finished and also export a png for the final product.
I cannot change to a different looking graphic as these ones I use come as a packaged deal with animation and other images other than pipes that correspond. Thank you for offering to look into these options for me but I fear they will not work.
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: Nikolay on October 02, 2017, 10:34:02 PM
It seems I also misunderstood... You seem to combine pictures to produce another picture..
Maybe you could try some (pure) graphical editor, such as Pain.NET or Photoshop? They also usually have a "gallery" that can be used to pick pictures (like a stencil).
The easiest would be of course to use the 3-D tool where these original pipes were created.
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: Yacine on October 03, 2017, 10:46:45 AM
This is just to finish my previous post.
I found my old isometrics library and did also a fast try with line patterns.

Check the attached VSD.
Title: Re: Multi-Shape with crop-ability and automatic resize
Post by: Yacine on October 03, 2017, 10:57:27 AM
... the VSDs ...