Class MarkingBuilderMeasurement
Represents a measurement for a logo.
public static class MarkingBuilderMeasurement
  - Inheritance
 - 
      
      MarkingBuilderMeasurement
 
- Inherited Members
 
Remarks
Uses the MarkingBuilder ActiveX component. This requires a MarkingBuilder installation. The MarkingBuilder ActiveX components (.ocx files) must be registered, see https://docs.lisrt.de/articles/Loehnert.Lisrt.Laser.Keyence/GettingStarted.html.
Methods
MeasureLogo(string)
Measures the size of the logo.
public static BlockSize MeasureLogo(string filename)
  Parameters
filenamestringThis can be a relative file name to the MarkingBuilder logos directory, or a absolute file path. The maximum length is 100 chars.
Returns
- BlockSize
 The size of the logo.
Exceptions
- ArgumentException
 Thrown when
filenameis null or empty.- NotSupportedException
 Thrown when
filenamedoes not end with '.mhl', '.mlg' or '.mwi'.- COMException
 Thrown when the file does not exist.
MeasureTrueTypeFontTextBlock(TextBlock)
Measures the size of a TrueType Font text block.
public static BlockSize MeasureTrueTypeFontTextBlock(TextBlock textBlock)
  Parameters
textBlockTextBlockText block to measure.
Returns
- BlockSize
 The size of the block.
MeasureTrueTypeFontTextBlock(string, TrueTypeFontStyle, string, double, double)
Measures the size of a TrueType Font text block.
public static BlockSize MeasureTrueTypeFontTextBlock(string fontName, TrueTypeFontStyle fontStyle, string content, double fontHeight, double characterWidth = 100)
  Parameters
fontNamestringName of the font.
fontStyleTrueTypeFontStyleStyle of the font.
contentstringText of the block.
fontHeightdoubleFont height in millimeters.
characterWidthdoubleWidth of the character in percent.
Returns
- BlockSize
 The size of the block.