Method FromFile
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
FromFile(string, double)
Reads a file: an RTF where it begins {\rtf, else a text file.
public static CadMTextContent FromFile(string path, double height)
Parameters
pathstringThe .txt or .rtf file.
heightdoubleThe MTEXT's height, which an RTF's sizes are taken as ratios of.
Returns
- CadMTextContent
The paragraphs of runs; one empty paragraph for an empty file.
Exceptions
- ArgumentException
Thrown when the path is empty.
- IOException
Thrown when the file cannot be read, or is over MaxBytes.
- UnauthorizedAccessException
Thrown when the file may not be read.