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

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

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: 250 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1121KB.
Tokens: post-login.
Cache hits: 14: 0.00546s for 26,724 bytes (show)
Cache misses: 4: (show)
Queries used: 16.

[Show Queries]