Answer of 1st Question:
This problem always is for don't attend to the "Category" word. In most cases, people don't attend to that word and use the "Shape Master Name" instead of "Shape Category"; however, they're different with each other.
In my case, I was being entered the
Shape Master Name (Property
) for
User.msvSDContainerRequiredCategories
(A semicolon-delimited list of category names. Other shapes must have at least one matching name to be allowed as container members.) and
User.msvSDListRequiredCategories
(A semicolon-delimited list of category names. Other shapes must have at least one matching name to be allowed as list members.) instead of
Shape Category (User.msvShapeCategories = Member
).
Figure 1[
^]
Figure 1 - Comparing "Shape Master Name" with "Shape Category"
Answer of 2nd Question:
For solving this problem, we must be attended to
two things:
First, We must add the shapes that we want to be added them automatically after instantiate the master shape. So, we must add the row(s) for each shape that we want to be added with name
User.msvSDListItemMaster[Index]
(The name or UniqueID of the master shape to create an instance of for Insert commands. The value must be placed inside a USE() function.).
As you can see, I want to add only one shape. So, I must change the name of the
User.msvSDListItemMaster
row to
User.msvSDListItemMaster1
.
If I want to add more shapes in instantiate time, I must add another row like User.msvSDListItemMaster2
, User.msvSDListItemMaster3
and so on.
Second and the last thing, we must add a formula to the "EventDrop" cell of "Events" section. As you can see, I've added it to my Custom List Shape as what mentioned in
here[
^] and
here[
^]:
Specifying an Insertion Shape
There are several ways to add a shape to a list: dragging and dropping the shape, clicking the blue insertion triangle that appears near the list edge, or right-clicking an existing member and inserting a shape. Clicking the insertion triangle and right-clicking to insert a shape both use the User.msvSDListItemMaster
cell to determine what shape to add to the list. The name of the master is placed in quotes inside a USE()
function (for example, USE("List member master")
). If no shape is specified in User.msvSDListItemMaster, Visio will duplicate an adjacent shape in the list when inserting the shape.
It is also possible to automatically populate the list with some member shapes when the list is first dropped on the page. To do this, put the following formula in the EventDrop cell of the list, repeating the DOCMD(2270)
once for each member to be added:
IF(LISTMEMBERCOUNT()=0,DOCMD(2270)+DOCMD(2270)+DOCMD(2270),0)
2270
is the command for inserting before an item in a list (visUiCmds.visCmdListInsertBefore
). It is also possible to use 2271
, the command for inserting after an item in a list (visUiCmds.visCmdListInsertAfter
).
The problem is for 2270
number. I don't know why it doesn't work; however, when I checked the above-mentioned cell in the
"Events" section of the Class Master Shape of the UML Stencil, I saw that
have been used 2499
instead of 2270
. So, I used that number in my formula, and it worked. If I have more than one shape for
User.msvSDListItemMaster[Index]
rows, I must add
+DOCMD(2499)
for every shape after shape 1.
Answer of 3rd Question:
This problem will solve if the problem of the 1st question be solved.
Answer of 4th Question:
This problem will solve if the problem of the 1st question be solved. As what mentioned in
here[
^] and
here[
^]:
Controlling List Membership
Lists have their own cells to govern list membership. Use the User.msvSDListRequiredCategories
and User.msvSDListExcludedCategories
cells to restrict what shapes can become list members. Because lists are also containers, it is possible for shapes to become container members of the list. The standard User.msvSDContainerRequiredCategories
and User.msvSDContainerExcludedCategories
cells determine this behavior.By default, Visio will attempt to add a shape to a list as a list member, but if that fails it may try to add it as a container member.The difference between a list member and a container member is that only list members will be arranged by the list and affect its size. Shape designers should manage both sets of membership cells to ensure the right results.
It's better that we use both User.msvSDListRequiredCategories
and User.msvSDContainerRequiredCategories
rows to get best efficiency.
Answer of 5th Question:
This problem will solve if the problem of the 1st question be solved.
Answer of 6th (Final) Question:
The answer is (
here[
^] and
here[
^]):
Custom Lists
Any shape that has a value of "List"
for the User.msvStructureType
cell is treated by Visio as a list.A list orders and arranges its member shapes automatically.Note that lists are also considered to be containers, and they have similar capabilities such as automatically moving, copying, or deleting member shapes. All of the previously mentioned container cells apply to list shapes.
Table 1. ShapeSheet container properties
User.msvSDContainerMargin
The distance between the container boundary and member shapes.
User.msvSDContainerResize
The automatic-resize behavior for the shape:
0 = No automatic resize.
1 = Expand as needed.
2 = Always fit to contents.
User.msvSDContainerStyle
A one-based index value for the current visual style of the container.
User.msvSDContainerStyleCount
The total number of visual styles that the container supports.
User.msvSDHeadingStyle
A one-based index value for the current visual style of the container heading.
User.msvSDHeadingStyleCount
The total number of visual styles that the container heading supports.
User.msvSDContainerLocked
A Boolean value that prevents membership changes in the container.
User.msvSDContainerRequiredCategories
A semicolon-delimited list of category names. Other shapes must have at least one matching name to be allowed as container members.
User.msvSDContainerExcludedCategories
A semicolon-delimited list of category names. Other shapes with at least one matching name are disallowed as container members.
User.msvSDContainerNoHighlight
A Boolean value that suppresses the container highlighting when member shapes are selected or added to the container.
User.msvSDContainerNoRibbon
A Boolean value that hides the Container Tools contextual tab in the ribbon for this container.
User.msvSDContainerHeadingEdge
A string that designates the location of the interior of the container from the perspective of the container heading. Must be "Left", "Right", "Top", or "Bottom".
User.msvSDMembersOnHiddenLayer
A Boolean value that determines whether Visio severs container relationships when the container or member is placed on a hidden layer. If True, Visio allows relationships to exist on the hidden layer. If False, Visio severs the relationships.