# MarkupTable class

Namespace: [Rhino.DocObjects.Tables](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.docobjects.tables.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md) · Since v9.0

```cs
public sealed class MarkupTable : RhinoDocCommonTable<Markup>, ICollection<Markup>
```

Collection of markups for a document

## Properties

- [ActiveCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/activecount.md): Returns number of markups in the table, excluding deleted markups.
- [ActiveIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/activeindex.md): Index of the markup being viewed or edited, or -1 when none is (including while creating a new markup).
- [ComponentType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/componenttype.md)
- [Count](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/count.md): Returns number of markups in the table, including deleted markups.
- [Document](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/document.md): Document that owns this table.

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/item.md): Conceptually, the markup table is an array of markups. The operator[] can be used to get individual markups. A markup is either active or deleted and this state is reported by Markup.IsDeleted.

## Methods

- [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/add.md): Adds a new markup with specified definition to the table.
- [AddReferenceMarkup](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/addreferencemarkup.md): Adds a reference markup that will not be saved in files.
- [Cancel](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/cancel.md): Discards the current markup edit or create session, or stops viewing a markup.
- [Create](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/create.md): (2 overloads) Adds a markup and its content without a markup session, as one undo step. The geometry is added to the document as the markup's content, and the view, captured before it is added, becomes the background. Any geometry type is allowed. It should lie on a plane parallel to the view, as markup tools draw it, but this is not enforced.
- [Delete](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/delete.md): (4 overloads) Deletes a markup.
- [Duplicate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/duplicate.md): Duplicates a markup.
- [Edit](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/edit.md): Starts editing a markup. Its content becomes editable document objects until [MarkupTable.Save()](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/save.md) or [MarkupTable.Cancel()](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/cancel.md).
- [Find](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/find.md): (2 overloads) Finds a markup with a matching ID.
- [FindIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/findindex.md): Retrieves a markup based on Index. This type of search is discouraged. We are moving towards using only IDs for all tables.
- [FindName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/findname.md): Finds the markup with a given name.
- [GetActiveObjectIds](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/getactiveobjectids.md): Ids of the document objects in the open markup create or edit session, including a new markup not yet saved to the table.
- [GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/getenumerator.md)
- [GetObjectIds](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/getobjectids.md): Ids of the document objects that make up a markup's content. Editable only during [MarkupTable.Edit(int)](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/edit.md).
- [GetUnusedMarkupName](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/getunusedmarkupname.md): Gets unused markup name used as default when creating new markups.
- [Modify](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/modify.md): Modify markup settings.
- [Save](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/save.md): Saves the current markup edit or create session, like the on-screen checkmark. Undoable as one step.
- [ICollection<Markup>.Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/system-collections-generic-icollection-rhino-docobjects-markup-add.md)
- [View](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.tables.markuptable/view.md): Shows a markup in the active view, as the Markups panel does. Ends any current markup session first.

## Inherited Members

- From [CommonComponentTable<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1.md): [Clear](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1/clear.md), [FindId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.fileio.commoncomponenttable-1/findid.md)
