Table of Contents

Method ParseScale

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

ParseScale(string, out double, out double)

Reads a scale as paper millimetres to drawing units: 1:50 is 1 to 50, 2:1 is 2 to 1, and a plain number is paper millimetres to one unit (0.02 is 1:50).

public static void ParseScale(string text, out double paperUnits, out double drawingUnits)

Parameters

text string

The scale.

paperUnits double

The paper millimetres, above nought.

drawingUnits double

The drawing units they stand for, above nought.

Exceptions

ArgumentNullException

Thrown when the text is null.

ArgumentException

Thrown when the text is not two numbers above nought with a colon, or one number above nought.