新创建的自定义列表形状在Microsoft Visio 2013 x64中不起作用 [英] New Created Custom List Shape Doesn't Work in Microsoft Visio 2013 x64

查看:113
本文介绍了新创建的自定义列表形状在Microsoft Visio 2013 x64中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标:

首先,我应该说我想做什么,然后我会描述我的意思已完成在下一个(描述)部分实现我的目标。

我想创建自定义列表主形状来自功能区的插入选项卡中图表部件部分的普通容器。然后,我想创建另一个主形状,可以使用作为创建的自定义列表主形状 的成员形状。

换句话说,我想将 my Created Master Shape 添加到我的自定义列表主形状,例如附加成员和分隔符主形状到UML模板的 Class Master Shape

所以,我遇到了一些实现目标的问题我已经在接下来的部分描述了它们。



描述:

我是在Visio Stencil(.vssx)文件中创建了一些新的主形状,如下所示:

图1 [ ^ ]

图1 - 使用主形状的新创建的主形状



属性主形状(绿盒子):即创建d来自 UML类模板的成员主形状(蓝盒

对象主形状(红盒):从功能区的插入选项卡中的图表部件部分的 普通容器创建。

该属性创建主形状以用作对象主形状中的成员形状,如在UML模板的类主形状中使用的成员主形状。

图2 [ ^ ]

图2 - 具有初始成员的类主形状



会员大师形状创建的 Property Master Shape 已更改如下:

我添加了 一个形状数据 到它(图3)。

图3 [ ^ ]

图3 - Property Master Shape的Shape Data对话框



我在其中添加了 一个数据图形项 (图4)。

图4 [ ^ ]

图4 - Property Master的数据图形和数据图形项对话框形状



我在 <中更改了 User.MemberName公式 b> ShapeSheet窗口的用户定义单元格的
部分如下(图5):

Objective:
First, I should say what I want to do, and then I'll describe what I've done to achieve to my Goal in the next (Descriptions) part.
I want to create a Custom List Master Shape from the Plain Container of the Diagram Parts section in the Insert tab of the ribbon. Then, I want to create another Master Shape that can use as the member shape for the Created Custom List Master Shape.
In other words, I want to add my Created Master Shape to my Custom List Master Shape like attaching the Member and Separator Master Shapes to the Class Master Shape of the UML Stencil.
So, I've faced with some problems in achieving to my Goal that I've described them in the next parts.

Descriptions:
I've created some new Master Shapes in a "Visio Stencil (.vssx)" file as follows:
Figure 1[^]
Figure 1 - New Created Master Shapes with used Master Shape

Property Master Shape (Green Box): that is created from the Member Master Shape of the UML Class Stencil (Blue Box).
Object Master Shape (Red Box): that is created from the Plain Container of the Diagram Parts section in the Insert tab of the ribbon.
The Property Master Shape is created to use as the member shape in the Object Master Shape like the Member Master Shape to use in the Class Master Shape of the UML Stencil.
Figure 2[^]
Figure 2 - Class Master Shape with its Initial Members

The Property Master Shape that is created from Member Master Shape has changed as follows:
I added one Shape Data to it (Figure 3).
Figure 3[^]
Figure 3 - "Shape Data" dialogue box of the Property Master Shape

I added one Data Graphic Item to it (Figure 4).
Figure 4[^]
Figure 4 - "Data Graphic" and "Data Graphic Item" dialogue boxes of the Property Master Shape

I changed the "User.MemberName" Formula in the User-defined cells' section of the ShapeSheet window as follows (Figure 5):

=MID(SUBSTITUTE(TRIM(SHAPETEXT(TheText)),"[",""),1,FIND(" ",SUBSTITUTE(TRIM(SHAPETEXT(TheText)),"[",""))-1)



而不是:


instead of:

=SHAPETEXT(TheText)



图5 [ ^ ]

图5 - Property Master Shape的ShapeSheet窗口



普通容器创建的对象主形状已更改如下:

我更改了ShapeSheet窗口
用户定义单元格和事件部分中单元格的内容,如图6所示:

图6 [ ^ ]

图6 - 更改内容后ShapeSheet窗口的用户定义单元格和事件部分中的单元格



而不是:

图7 [ ^ ]

图7 - 用户定义单元格中的单元格'更改内容之前ShapeSheet窗口的事件和事件部分



问题:



第一个问题:

为什么不是/不是物业大师的实例在将它们/它们添加到对象主体形状的实例之后正确排列和放置形状,就像将成员主形状的实例添加到UML模板的类主形状的实例一样(图8) )?

图8 [ ^ ]

图8 - 将对象主形状的实例与属性主形状的一个实例与UML模板的类主形状及其初始成员的实例进行比较



第二个问题:

为什么不是Object Master Shape的实例添加其初始成员将它/它们附加到页面后,如在将UML模板的类主形状的实例添加到页面后添加初始成员(图9)?

图9 [ ^ ]

图9 - 比较实例具有UML模板的类主形状实例的对象主形状



我添加了以下公式以实现这个目标; 但是,我认为它不起作用:


Figure 5[^]
Figure 5 - "ShapeSheet" window of the Property Master Shape

The Object Master Shape that is created from the Plain Container has changed as follows:
I changed the contents of the cells in the User-defined cells' and Events sections of the ShapeSheet window as Figure 6:
Figure 6[^]
Figure 6 - Cells in the User-defined cells' and Events sections of the ShapeSheet window after changing their contents

instead of:
Figure 7[^]
Figure 7 - Cells in the User-defined cells' and Events sections of the ShapeSheet window before changing their contents

Questions:

1st Question:
Why isn't/aren't instance(s) of the Property Master Shape arranged and placed correctly after adding it/them to the instance(s) of the Object Master Shape like adding instance(s) of the Member Master Shape to the instance(s) of the Class Master Shape of the UML Stencil (Figure 8)?
Figure 8[^]
Figure 8 - Comparing an instance of the Object Master Shape and one instance of the Property Master Shape with an instance of the Class Master Shape of the UML Stencil and its Initial Members

2nd Question:
Why do(es)n't instance(s) of the Object Master Shape add its Initial Members after attaching it/them to the page like adding Initial Members after adding Instance(s) of the Class Master Shape of the UML Stencil to the page (Figure 9)?
Figure 9[^]
Figure 9 - Comparing an instance of the Object Master Shape with an instance of the Class Master Shape of the UML Stencil

I've added the following Formula for achieving to this objective; However, I think that it doesn't work:

=IF(LISTMEMBERCOUNT()=0,DOCMD(2270),0)





第3个问题:

为什么在实例中没有显示条形图Object Master Shape用于插入Property Master Shape的实例,比如在UML Stencil的Class Master Shape的实例中显示Bar以插入其成员(图10)?

图10 [ ^ ]

图10 - 将Object Master Shape的实例与UML Stencil的Class Master Shape实例进行比较,以显示插入相关成员的Bar



第4个问题:

为什么(s)实例e Object Master Shape接受所有主形状的实例,但不仅仅是属性主形状的实例,而不是仅接受实例的UML模板的类主形状的实例。 UML模板的成员和分隔符主形状(图11)?

图11 [ ^ ]

图11 - 将接受所有主形状实例的对象主形状的实例与仅接受实例的UML模板的类主形状的实例进行比较UML模板的成员和分隔符主形状


我为User.msvSDListItemMaster设置 = USE(Property) 在ShapeSheet窗口的用户定义的单元格部分中; 但是,我认为它不起作用。



第5个问题:

为什么不显示/不显示在属性的添加实例上插入成员的选项主形状对象主形状的实例,如UML模板的成员和分离器主形状的附加实例,以及UML模板的类主形状的实例(图12)?

图12 [ ^ 上显示插入成员的选项

图12 - 将对象主形状的一个实例和属性主形状的一个实例与UML模板的类主形状的实例及其成员进行比较以显示添加的插入成员的选项成员



第6名(最终)问题:

为什么选择当我将其主对象更改为列表时,对象主形状的实例的行为和行为类似于容器?



3rd Question:
Why isn't displayed a Bar in the instance(s) of the Object Master Shape to insert instance(s) of the Property Master Shape like displaying the Bar in the instance(s) of the Class Master Shape of the UML Stencil to insert its Members (Figure 10)?
Figure 10[^]
Figure 10 - Comparing an instance of the Object Master Shape with an instance of the Class Master Shape of the UML Stencil for displaying the Bar to insert related Members

4th Question:
Why do(es) instance(s) of the Object Master Shape accept instance(s) of All Master Shapes except than only instance(s) of the Property Master Shape, instead of the instance(s) of the Class Master Shape of the UML Stencil that only accept(s) the instance(s) of the Member and Separator Master Shapes of the UML Stencil (Figure 11)?
Figure 11[^]
Figure 11 - Comparing an instance of the Object Master Shape that accepts instance(s) of All Master Shapes with an instance of the Class Master Shape of the UML Stencil that only accepts the instance(s) of the Member and Separator Master Shapes of the UML Stencil

I've set =USE("Property") for the "User.msvSDListItemMaster" in the User-defined cells' section of the ShapeSheet window; However, I think that it doesn't work.

5th Question:
Why isn't/aren't displayed options for inserting Members on the added instance(s) of the Property Master Shape to the instance(s) of the Object Master Shape like attached instance(s) of the Member and Separator Master Shapes of the UML Stencil to the instance(s) of the Class Master Shape of the UML Stencil (Figure 12)?
Figure 12[^]
Figure 12 - Comparing an instance of the Object Master Shape and one instance of the Property Master Shape with an instance of the Class Master Shape of the UML Stencil and its Members for displaying Options of the inserting members on the added members

6th (Final) Question:
Why do(es) instance(s) of the Object Master Shape behave and act like the Container while I've changed its/their Master Object to a List?

推荐答案

第一个问题的回答:

这个问题总是因为不参加类别字。在大多数情况下,人们不会关注该词并使用形状主名称而不是形状类别;然而,它们彼此不同。

在我的情况下,我正在输入形状主名 Property User.msvSDContainerRequiredCategories (以分号分隔的类别名称列表其他形状必须至少有一个匹配的名称才能被允许作为容器成员。) User.msvSDListRequiredCategories (以分号分隔的类别名称列表。其他形状必须至少有一个匹配的名称才能作为列表成员。)而不是形状类别 User.msvShapeCategories =会员

图1 [使用形状类别比较形状主名称>> ^ ]

图1 - 将形状主名称与形状类别进行比较



第二个问题的回答:

求解这个问题,我们必须注意两件事

首先,我们必须在实例化主形状后添加我们想要自动添加的形状。 因此,我们必须为每个要添加的形状添加行名称 User.msvSDListItemMaster [Index] (名称)或主形状的UniqueID,以创建插入命令的实例。该值必须放在USE()函数内。)

如您所见,我只想添加一个形状。因此,我必须将 User.msvSDListItemMaster 行的名称更改为 User.msvSDListItemMaster1 如果我想在实例化时间添加更多形状,我必须添加另一行,如 User.msvSDListItemMaster2 User.msvSDListItemMaster3 依此类推。

第二件事,我们必须在EventDrop单元格中添加一个公式事件
部分。正如您所看到的,我已将其添加到我的自定义列表形状中,如 here [ ^ ]和这里 [ ^ ]:

指定插入形状

有几种方法可以将形状添加到列表中:拖放形状,单击蓝色插入三角形出现在列表边缘附近,或右键单击现有成员并插入形状单击插入三角形并右键单击以插入形状都使用 User.msvSDListItemMaster 单元格来确定要添加到列表中的形状。主文件名放在 USE()函数内的引号中(例如, USE(列表成员) master))。如果 User.msvSDListItemMaster 中未指定形状,则Visio将在插入形状时复制列表中的相邻形状。

当列表首次放在页面上时,也可以使用某些成员形状自动填充列表。为此,请将以下公式放在列表的 EventDrop 单元格中,重复 DOCMD(2270) 对于要添加的每个成员:

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 是在列表中的项目之前插入的命令( visUiCmds.visCmdListInsertBefore )。也可以使用 2271 ,在列表中的项目之后插入的命令( visUiCmds.visCmdListInsertAfter )。


问题在于 2270 数字。 我不知道为什么它不起作用;但是,当我在UML模板的Class Master Shape的Events部分检查上面提到的单元格时,我看到已被使用 2499 而不是 2270 所以,我在公式中使用了这个数字,它有效。如果我有 User.msvSDListItemMaster [Index] 行的多个形状,我必须添加 + DOCMD(2499) 形状后的每个形状1.



第3个问题的答案:

如果第一个问题的问题得到解决,这个问题就解决了。



第四个问题的答案:

如果第一个问题的问题得到解决,这个问题就解决了。正如在其中 [ ^ ]和 here [ ^ ]:



控制列表成员资格

列表有自己的单元格来管理列表成员资格。 使用 User.msvSDListRequiredCategories User.msvSDListExcludedCategories 单元格来限制哪些形状可以成为列表成员。因为列表也是容器,所以形状可以成为列表的容器成员。标准 User.msvSDContainerRequiredCategories User.msvSDContainerExcludedCategories 单元格确定此行为。默认情况下,Visio将尝试添加形状作为列表成员列表,但如果失败,它可能会尝试将其添加为容器成员。列表成员和容器成员之间的区别在于列表成员将按列表排列并影响其大小。形状设计师应该管理两组会员单元以确保正确的结果。




我们最好同时使用 User.msvSDListRequiredCategories User.msvSDContainerRequiredCategories 获取最佳效率



第5个问题答案:

如果第一个问题的问题得到解决,这个问题就解决了。



第6个答案(最后)问题:

答案是(在其中 [ ^ ]和在哪里 [ ^ ] ):

自定义列表

任何形状的值 列表 User.msvStructureType 单元格被Visio视为列表。列表自动排序并排列其成员形状。请注意,列表也被视为容器,它们具有类似的功能,例如自动移动,复制或删除成员形状s。所有前面提到的容器单元格都适用于列表形状。



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.


这篇关于新创建的自定义列表形状在Microsoft Visio 2013 x64中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆