Prevent a shape from being added to containers

Started by rezingg, June 16, 2022, 10:55:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rezingg

Is there a shape setting to prevent that shape from being automatically added to a container?
I know I can lock a container so shapes are not added to it, but I am looking for a setting in the shape that is dropped, not the container.

Here is the problem. I have a bunch of containers on a page. Now I'd like to draw a rectangle around a part of that page (around a few containers).
Whenever I do that, the container onto which the centroid of the large rectangle falls will automatically add the rectangle to itself and increase in size to fit the large rectangle. NOT wat I want. I would like the containers to keep their behavior to automatically add shapes that are dropped onto them and increase in size, if needed. But I want to set some property on the large rectangle (before I drop it over the containers), such that this particular shape is not being added.

Thanks for your help!

wapperdude

Not aware of any setting to do this.  What you might do is draw your rectangle off-page, and then send it to the back.  Now you ought to be able to move, rezize, position the rectangle as desired.  Disclaimer:  I've not tried this.
Visio 2019 Pro

rezingg

Unfortunately the order does not seem to matter. Even if I first push the rectangle to the back, as soon its centroid is moved over one of the containers, that container will grab the shape (the rectangle).
The only solution I found, though not really what I want, is to use yet another container as the large rectangle...

Yacine

Quote from: rezingg on June 21, 2022, 05:55:27 PM
The only solution I found, though not really what I want, is to use yet another container as the large rectangle...
Very good idea. Supress the title and you're done.

There are other possibilities, but they require prepared shapes.

1. Use the fields user.msvSDContainerExcludedCategories or user.msvSDContainerRequiredCategories depending on your preferred scenario.
Don't ask for more details, I'm not a container specialist, but here is a starting link.
https://techcommunity.microsoft.com/t5/microsoft-365-blog/custom-containers-lists-and-callouts-in-visio-2010/ba-p/237586

2. Using some clever settings at page and container level.
- have a prop field for the page that switches the catching of containers. eg prop.container_catch / type=boolean
- use only containers from your stencil with the following setting:
  user.msvSDContainerLocked = thepage!prop.container_catch
  Now, when you want to draw around the containers set the prop.container_catch to False first, then draw.
  and vice versa when you want to use the catch feature of the containers turn it to True.
Yacine

vojo

so I guess after all these releases with container support, MS did not make the behaviors of "add on drop" and "accept drops" work for containers???  (developer ==> behavior ==> add on drop / accept dropped shapes)

I probably being really obtuse, but I could never figure out what containers do that groups does not do.

Yacine

#5
Quote from: vojo on June 22, 2022, 07:21:14 PM
so I guess after all these releases with container support, MS did not make the behaviors of "add on drop" and "accept drops" work for containers???  (developer ==> behavior ==> add on drop / accept dropped shapes)

I probably being really obtuse, but I could never figure out what containers do that groups does not do.

A lot of truth, but not quite right.

So you're asked to find a solution for grouping shapes and do funny things with them - like displaying them as list, providing a title, requiring or excluding certain types of shapes, automatic resizing , etc.

So you start with groups and realize that you need to tweak them. Not only are they not only groups, with a lot of shapesheet stuff going under the hoods, but you realize too that you need some automatically running routines in the background.

Things going on and developing, you are now with a customized version of an otherwise called group. What about calling it "Containers" and let your employer sell it as new feature?
What at the end of the day it really is. Think of the timeline solution.
Yacine

Bork

A simple fix would to put the large rectangle on a background page