Table of contents
TOC
Collapse the table of content
Expand the table of content

ContainerProperties.InsertListMember Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Adds a shape or set of shapes to the list in the container.

Syntax

expression . InsertListMember( ObjectToInsert , Position )

expression A variable that represents a ContainerProperties object.

Parameters

NameRequired/OptionalData TypeDescription
ObjectToInsertRequired[UNKNOWN]The object or selection to insert in the list. Can be a Shape or Selection object.
PositionRequiredLongThe insertion point in the list, which is one-based.

Return Value

Nothing

Remarks

If the container is not a list, Microsoft Visio returns an Invalid Source error.

If the ObjectToInsert parameter contains any non-top-level shapes or, if the list is locked, Visio returns an Invalid Parameter error. You cannot insert any of the following objects into a list:

  • Another list.

  • A callout.

  • Routable connectors.

  • Shapes whose PinX or PinY cells have the BOUND, GUARD, or SETATREF function applied.

  • A member of another locked list.

Visio ignores shapes in ObjectToInsert that are already members of the list.

To insert before the first item in the list, pass 1 for the Position parameter. To insert at the end of the list, pass a Position value equal to or greater than the value of the list count plus 1. If you pass an out-of-range position, Visio chooses the nearest valid position.

If ObjectToInsert does not match category requirements for lists, Visio returns an error.

Categories are user-defined strings that you can use to categorize shapes and, thereby, to restrict membership in a container. You can define categories in the User.msvShapeCategories cell in the ShapeSheet for a shape. You can define multiple categories for a shape by separating them with semicolons.

© 2018 Microsoft