# Model3DViewCollection

## Content

# Class: Model3DViewCollection

Defines the collection of [Model3DView](Model3DView) objects.

## Extends

- `PdfCollection`&lt;[`Model3DView`](Model3DView)&gt;

## Accessors

### count

#### Get Signature

```ts
get count(): number;
```

Gets the number of items in the collection.

##### Returns

`number`

#### Overrides

```ts
PdfCollection.count
```

***

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

```ts
PdfCollection.id
```

***

### last

#### Get Signature

```ts
get last(): TItem;
```

Gets last item in the collection.

##### Returns

`TItem`

#### Inherited from

```ts
PdfCollection.last
```

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

```ts
PdfCollection.om
```

## Methods

### add()

```ts
add(item): void;
```

Adds an item to the end of the collection.

#### Parameters

##### item

  \| [`Model3DViewProperties`](../type-aliases/Model3DViewProperties)
  \| [`Model3DView`](Model3DView)

The 3D view specified as [Model3DViewProperties](../type-aliases/Model3DViewProperties) or [Model3DView](Model3DView).

#### Returns

`void`

#### Overrides

```ts
PdfCollection.add
```

***

### clear()

```ts
clear(): void;
```

Clears the collection.

#### Returns

`void`

#### Overrides

```ts
PdfCollection.clear
```

***

### contains()

```ts
contains(item): boolean;
```

Determines whether the item is in the collection.

#### Parameters

##### item

[`Model3DView`](Model3DView)

#### Returns

`boolean`

true if the item is in the collection, false otherwise.

#### Overrides

```ts
PdfCollection.contains
```

***

### findByName()

```ts
findByName(name): Model3DView;
```

Finds and returns the first [Model3DView](Model3DView) in this collection
whose [Model3DView.name](Model3DView#name) equals the specified 'name',
if [Model3DView.name](Model3DView#name) is empty then [Model3DView.uiName](Model3DView#uiname) is used.

#### Parameters

##### name

`string`

The name of the view to find.

#### Returns

[`Model3DView`](Model3DView)

The [Model3DView](Model3DView) with the specified name, or <c>null</c> if no matching view is found.

***

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

```ts
PdfCollection.free
```

***

### getAt()

```ts
getAt(index): Model3DView;
```

Gets the item with the specified index.

#### Parameters

##### index

`number`

The index of the item.

#### Returns

[`Model3DView`](Model3DView)

#### Overrides

```ts
PdfCollection.getAt
```

***

### indexByName()

```ts
indexByName(name): number;
```

Returns the zero-based index of the first [Model3DView](Model3DView) in this collection
whose [Model3DView.name](Model3DView#name) equals the specified 'name',
if [Model3DView.name](Model3DView#name) is empty then [Model3DView.uiName](Model3DView#uiname) is used.

#### Parameters

##### name

`string`

The name of the view to locate.

#### Returns

`number`

The zero-based index of the first occurrence of a view with the specified name if found;
otherwise, -1.

***

### insert()

```ts
insert(index, item): void;
```

Inserts an item at a specific position in the collection.

#### Parameters

##### index

`number`

The position where the item will be inserted.

##### item

[`Model3DView`](Model3DView)

The item to insert.

#### Returns

`void`

#### Overrides

```ts
PdfCollection.insert
```

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

```ts
PdfCollection.rebind
```

***

### remove()

```ts
remove(item): boolean;
```

Removes the specified item from the collection.

#### Parameters

##### item

[`Model3DView`](Model3DView)

The item to remove.

#### Returns

`boolean`

true if the item was actually removed, false otherwise.

#### Overrides

```ts
PdfCollection.remove
```

***

### removeAt()

```ts
removeAt(index): void;
```

Removes the item at specified index.

#### Parameters

##### index

`number`

The index of the item to remove.

#### Returns

`void`

#### Overrides

```ts
PdfCollection.removeAt
```

***

### setAt()

```ts
setAt(index, item): void;
```

Sets the item at the specified index.

#### Parameters

##### index

`number`

The index of the item, starting from 0.

##### item

[`Model3DView`](Model3DView)

The object to set.

#### Returns

`void`

#### Overrides

```ts
PdfCollection.setAt
```
