Method InsertAt
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
InsertAt(int, DxfEntity)
Puts an entity in the group before the one at an index, as AutoCAD's InsertAt; the count of the group puts it last.
public void InsertAt(int index, DxfEntity entity)
Parameters
indexintThe index, from 0 to NumEntities.
entityDxfEntityThe entity, of the group's drawing and not in the group.
Exceptions
- ArgumentNullException
Thrown when the entity is null.
- ArgumentOutOfRangeException
Thrown when the index is outside 0 to NumEntities.
- ArgumentException
Thrown when the entity is in the group already, or is not an entity of the group's drawing.
- InvalidOperationException
Thrown when the group is in no file, or is erased.
InsertAt(int, IEnumerable<DxfEntity>)
Puts entities in the group, in their order, before the one at an index, as AutoCAD's InsertAt of a collection.
public void InsertAt(int index, IEnumerable<DxfEntity> entities)
Parameters
indexintThe index, from 0 to NumEntities.
entitiesIEnumerable<DxfEntity>The entities.
Exceptions
- ArgumentNullException
Thrown when the entities or one of them are null.
- ArgumentOutOfRangeException
Thrown when the index is outside 0 to NumEntities.
- ArgumentException
Thrown when one is in the group already or given twice, or is not an entity of the group's drawing.
- InvalidOperationException
Thrown when the group is in no file, or is erased.