Table of Contents

Method LoadMlineStyleFile

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

LoadMlineStyleFile(string, string)

Loads a multiline style from a file of them, as AutoCAD's LoadMlineStyleFile loads one from acad.mln: an MLINESTYLE of the style's groups added to the dictionary of multiline styles (MLStyleDictionary) under its name, as a DxfMlineStyle, written as AutoCAD writes one: 100 AcDbMlineStyle, then its name (2), flags (70), description (3), fill (62), angles (51, 52), count of elements (71) and each element's offset (49), colour (62) and linetype (6), as the file gives them. A drawing with no dictionary of multiline styles is given one, ACAD_MLINESTYLE of its named object dictionary.

public void LoadMlineStyleFile(string mlineStyleName, string fileName)

Parameters

mlineStyleName string

The name of the style, letters of either case the same.

fileName string

The path of the file of multiline styles.

Remarks

A style of the file is opened by MLSTYLE and given as its groups, each a code on one line and its value on the next, up to a group 0, as AutoCAD writes acad.mln; its STANDARD is two elements 0.5 either side of the line, by layer.

Exceptions

ArgumentNullException

Thrown when the name or the path is null.

ArgumentException

Thrown when the file has no style of the name, the drawing's dictionary has one of it already, or an element is drawn with a linetype the drawing has not.

FormatException

Thrown when the file does not give a group code where it should.

InvalidOperationException

Thrown when the drawing has no named object dictionary, as one of R12.

IOException

Thrown when the file cannot be read, a FileNotFoundException where there is none.