DocumentObjectCollection module

class DocumentObjectCollection.DocumentObjectCollection

Bases: DocumentSerializableCollection, IDocumentObjectCollection

Represents a collection of DLS entities.

Add(entity: IDocumentObject) int

Adds the specified entity.

Parameters:

entity (IDocumentObject) – the document object.

Returns:

The index.

Clear()

Removes all items

Contains(entity: IDocumentObject) bool

Determines whether a entity is in the collection.

Parameters:

entity (IDocumentObject) – The document object.

property FirstItem: DocumentObject

Gets the first item.

Returns:

The first item.

IndexOf(entity: IDocumentObject) int

Returns the zero-based index of the specified entity.

Parameters:

entity (IDocumentObject) – The document object.

Insert(index: int, entity: IDocumentObject)

Inserts a entity into the collection at the specified index.

Parameters:
  • index (int) – The index.

  • entity (IDocumentObject) – The document object.

property LastItem: DocumentObject

Gets the last item.

Returns:

The last item.

Remove(entity: IDocumentObject)

Removes the document object from the collection.

Parameters:

entity (IDocumentObject) – The document object.

RemoveAt(index: int)

Removes the document object at the specified index from the collection.

Parameters:

index (int) – The index.

get_Item(index: int) DocumentObject

Gets the DocumentObject at the specified index.

Parameters:

index (int) – The index of the DocumentObject.

Returns:

The DocumentObject at the specified index.