ReadFile Class

Utility class for loading Eyeshot files asynchronously.
Public Class ReadFile 
Inherits ReadFileAsyncWithDrawings 
Implements IDisposable
This language is not supported or no code example is available.
public class ReadFile : ReadFileAsyncWithDrawings
IDisposable
This language is not supported or no code example is available.
Name Description
Public constructor ReadFile(Stream, FileSerializer, bool) File stream and fileSerializer constructor.
Public constructor ReadFile(Stream, bool, contentType) File stream constructor.
Public constructor ReadFile(Stream, contentType) File stream and content constructor.
Public constructor ReadFile(string, FileSerializer, bool) File name and fileSerializer constructor.
Public constructor ReadFile(string, bool, contentType) File name constructor.
Public constructor ReadFile(string, contentType) File name and content constructor.
Top
Name Description
Public property Blocks Gets or sets the blocks resulting from file reading. (inherited from ReadFileAsyncWithBlocks).
Public property Camera The Camera definition.
Public property DrawingsBlocks Gets the drawings blocks referenced by layouts resulting from file reading. (inherited from ReadFileAsyncWithDrawings).
Public property DrawingsCenterlinesLayerName Gets or sets the drawings centerlines layer name.
Public property DrawingsCenterlinesLineTypeName Gets or sets the drawings centerlines line type name.
Public property DrawingsEdgesLayerName Gets or sets the drawings edges layer name.
Public property DrawingsGhostCirclesLayerName Gets or sets the drawings ghost circles layer name.
Public property DrawingsHatchPatterns Gets the drawings hatch patterns referenced by layouts resulting from file reading. (inherited from ReadFileAsyncWithDrawings).
Public property DrawingsHiddenEdgesLayerName Gets or sets the drawings hidden edges layer name.
Public property DrawingsHiddenSegmentsLineTypeName Gets or sets the drawings hidden segments linetype name.
Public property DrawingsHiddenSilhouettesLayerName Gets or sets the drawings hidden silhouettes layer name.
Public property DrawingsHiddenWiresLayerName Gets or sets the drawings hidden wires layer name.
Public property DrawingsLayers Gets the drawings layers referenced by layouts resulting from file reading. (inherited from ReadFileAsyncWithDrawings).
Public property DrawingsLineTypes Gets the drawings line types referenced by layouts resulting from file reading. (inherited from ReadFileAsyncWithDrawings).
Public property DrawingsSheets Gets the drawings sheets read from the file. (inherited from ReadFileAsyncWithDrawings).
Public property DrawingsSilhouettesLayerName Gets or sets the drawings silhouettes layer name.
Public property DrawingsTextStyles Gets the drawings text styles referenced by layouts resulting from file reading. (inherited from ReadFileAsyncWithDrawings).
Public property DrawingsWiresLayerName Gets or sets the drawings wires layer name.
Public property Entities Gets the entities resulting from file reading. (inherited from ReadFileAsync).
Public property ExecutionTime Gets the (last) work execution time in milliseconds. (inherited from WorkUnit).
Public property FileHeader Gets the file header.
Public property FileName Gets the file name. (inherited from ReadFileAsync).
Public property FileSerializer Gets the FileSerializer used to read the file.
Public property HatchPatterns Gets the model collection of the hatch patterns read from the file. (inherited from ReadFileAsyncWithDrawings).
Public property HeaderOnly When true, only the file header is read.
Public property LineTypes Gets the model collection of the line types read from the file. (inherited from ReadFileAsyncWithDrawings).
Public property Log Gets the list of errors and warnings generated during execution. (inherited from WorkUnit).
Public property Materials Gets the collection of materials read from the file. (inherited from ReadFileAsyncWithDrawings).
Public property ParsingBlocksText Gets or sets the "Parsing blocks..." text string. (inherited from ReadFileAsyncWithBlocks).
Public property ParsingEntitiesText Gets or sets the "Parsing entities..." text string. (inherited from ReadFileAsync).
Public property ParsingText Gets or sets the "Parsing..." text string. (inherited from ReadFileAsync).
Public property Path Gets input file path. (inherited from ReadFileAsync).
Public property ReadingText Gets or sets the "Reading..." text string. (inherited from ReadFileAsync).
Public property RestoreCamera Indicates whether the Camera will be restored when calling AddToScene method. Default value is true.
Public property Result Gets the result of reading operation (true if the operation succeeded). (inherited from ReadFileAsync).
Public property Status Gets the WorkUnit status. (inherited from WorkUnit).
Public property Stream Gets current stream. (inherited from ReadFileAsync).
Public property SupportedLinearUnitsType Gets the supported linear units
Public property TextStyles Gets the model collection of text styles read from the file. (inherited from ReadFileAsyncWithDrawings).
Public property Units Gets or sets imported geometry linear units. (inherited from ReadFileAsyncWithBlocks).
Top
Methods
 
Name Description
Public method AddToDrawings(Drawings) Adds sheets, blocks, layers, text styles, line types read from the file to the drawings control. (inherited from ReadFileAsyncWithDrawings).
Public method AddToScene(Environment, RegenOptions) Adds to the Environment control the entities loaded from the file, along with the other master collections. Items contained previously in the Environment are merged, except the root block that is replaced with the one loaded from the file, if it exists.
Public method AddToScene(Environment, bool, RegenOptions) Adds to the Environment control the entities loaded from the file, along with the other master collections. Items contained previously in the Environment are merged.
Internal protected (Protected Friend) method Cancelled(BackgroundWorker, DoWorkEventArgs) Checks if the user has requested cancellation of the background operation. (inherited from WorkUnit).
Internal protected (Protected Friend) method CloseStream() Closes the stream. Must be called by all derived classes. (inherited from ReadFileAsync).
Public method Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Internal protected (Protected Friend) method DoWork(BackgroundWorker, DoWorkEventArgs) Does the actual work allowing progress bar update and cancellation.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (inherited from Object).
Public method FillAllCollectionsData(Environment) Automatically merges all master collections with existing ones. (inherited from ReadFileAsync).
Protected method FillAllDrawingsCollectionsData(Drawings) Automatically merges all the drawings collections with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillBlocks(Environment, bool, RegenOptions, bool) Automatically merges block definitions with existing ones. (inherited from ReadFileAsyncWithBlocks).
Public method FillDrawingsBlocks(Drawings) Automatically merges drawings blocks with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillDrawingsHatchPatterns(Drawings) Automatically merges drawings hatch patterns with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillDrawingsLayers(Drawings) Automatically merges drawings layers with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillDrawingsLineTypes(Drawings) Automatically merges drawings line types with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillDrawingsSheets(Drawings) Automatically merges sheets with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillDrawingsTextStyles(Drawings) Automatically merges drawings text styles with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillHatchPatterns(Environment) Automatically merges hatch patterns with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillLayers(Environment) Automatically merges layers with existing ones. (inherited from ReadFileAsyncWithBlocksAndLayers).
Public method FillLineTypes(Environment) Automatically merges line types with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillMaterials(Model) Automatically merges materials with existing ones. (inherited from ReadFileAsyncWithDrawings).
Public method FillTextStyles(Environment) Automatically merges text styles with existing ones. (inherited from ReadFileAsyncWithDrawings).
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object).
Public method Static GetFileInfo(string) Gets the file header info.
Public method GetFileInfo() Gets the file header info.
Public method GetHashCode Serves as the default hash function. (inherited from Object).
Public method GetHeader() Gets the file header.
Public method Static GetHeader(string) Gets the file header.
Public method GetThumbnail(int) Gets the thumbnail.
Public method Static GetThumbnail(string, int) Gets the thumbnail.
Public method GetType Gets the Type of the current instance. (inherited from Object).
Protected method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object).
Internal protected (Protected Friend) method ResetProgressParallel(int) Resets the progress bar for a parallel loop. (inherited from WorkUnit).
Public method RotateEverythingAroundX(double) Rotates geometry around world X axis. If the file was created in a system that orients with Y Axis Up, the models would by default be brought into Eyeshot (a Z axis up system) with a flipped coordinate system. This method is designed to fix the problem. (inherited from ReadFileAsyncWithBlocks).
Internal protected (Protected Friend) method StartContinuousAnimation(string, BackgroundWorker, params string[]) Start the animation for the continuous progress bar. (inherited from WorkUnit).
Internal protected (Protected Friend) method StopContinuousAnimation(BackgroundWorker) Stop the animation for the continuous progress bar. (inherited from WorkUnit).
Public method ToString Returns a string that represents the current object. (inherited from Object).
Internal protected (Protected Friend) method UpdateProgress(double, double, string, BackgroundWorker, bool, params string[]) Updates the progress bar value. (inherited from WorkUnit).
Internal protected (Protected Friend) method UpdateProgress(int, int, string, BackgroundWorker, bool, params string[]) Updates the progress bar value. (inherited from WorkUnit).
Internal protected (Protected Friend) method UpdateProgressAndCheckCancelled(int, int, string, BackgroundWorker, DoWorkEventArgs, bool, params string[]) Updates the progress bar value and checks if the worker thread has been canceled. (inherited from WorkUnit).
Internal protected (Protected Friend) method UpdateProgressAndCheckCancelledParallel(int, string, BackgroundWorker, DoWorkEventArgs, params string[]) Updates the progress bar value and checks if the worker thread has been canceled, for a parallel loop. (inherited from WorkUnit).
Internal protected (Protected Friend) method UpdateProgressParallel(double, string, BackgroundWorker, params string[]) Updates the progress bar value for a parallel loop. (inherited from WorkUnit).
Internal protected (Protected Friend) method UpdateProgressTo100(string, BackgroundWorker, params string[]) Set the progress bar to 100% and forces screen update. (inherited from WorkUnit).
Internal protected (Protected Friend) method WorkCancelled(Environment) Called when the work is cancelled. (inherited from ReadFileAsync).
Internal protected (Protected Friend) method WorkCompleted(Environment) Called when the work has completed. In the case you are modeling something, the environment parameter allows you to easily add the model to the entities collection. (inherited from WorkUnit).
Internal protected (Protected Friend) method WorkFailed(Environment) Called when the work has failed. (inherited from WorkUnit).
Top
Events
 
Name Description
Public event ProgressChanged Occurs when the DoWork() is called synchronously and the progress has changed. (inherited from WorkUnit).
Top
Fields
 
Name Description
Public field Layers Gets or sets the list of layers resulting from file reading. (inherited from ReadFileAsyncWithBlocksAndLayers).
Internal protected (Protected Friend) field log (inherited from WorkUnit).
Protected field readFileCloseStream (inherited from ReadFileAsync).
Top

.NET Framework

Supported in: 4.8

In this article

Definition