IDrawingFile

Namespace: Digi21.DigiNG.IO
Assembly: Digi21.DigiNG

Drawing file whose entities can be read, added and deleted.

public interface IDrawingFile : IReadOnlyDrawingFile

Implements: IReadOnlyDrawingFile, which in turn implements IEnumerable<Entity> and IWindow3D.

Implementations: Bin, BinDouble, Shp, Geomedia, DrawingFile, Dgn, Dwg and MemoryDrawingFile.

An entity added using Add becomes owned by the file: its Owner property is the file. An entity belonging to another file cannot be added: add the copy returned by Clone().

Properties

Property Description
CanRead true if the file format allows entities to be read.
CanWrite true if entities can be added and deleted.
DatabaseTables Tables in the database associated with the file: table name and table number.
ConnectionString Connection string of the database associated with the file. Inherited from IReadOnlyDrawingFile.
Path Drawing file path. Inherited from IReadOnlyDrawingFile.
Visible File visibility in the drawing window. Inherited from IReadOnlyDrawingFile.
Wkt WKT of the file's coordinate reference system. Inherited from IReadOnlyDrawingFile.
Xmin, Ymin, Zmin, Xmax, Ymax, Zmax, Valid, Width, Height, Depth, Center, NW, N, NE, E, SE, S, SW, W Minimum and maximum coordinates of the file's entities. Inherited from IWindow3D.

Methods

Method Description
Add(Entity) Appends an entity to the file.
Add(IEnumerable<Entity>) Appends multiple entities to the file in enumeration order.
Add(Line)
Add(Point), Add(Text), Add(Polygon), Add(Complex)
Add an entity of that type and return it with its read-only type (ReadOnlyLine, ReadOnlyPoint, ReadOnlyText, ReadOnlyPolygon or ReadOnlyComplex).
Delete(Entity) Deletes an entity from the file.
Delete(IEnumerable<Entity>) Deletes multiple entities from the file.
IndexOf(Entity) Entity's position in the file, or -1. Inherited from IReadOnlyDrawingFile.
IEnumerator<Entity> GetEnumerator() Enumerator of the file's entities. Inherited from IEnumerable<Entity>.

Example

The IReadOnlyDrawingFile example copies points from a file to an IDrawingFile using CanWrite and Add.