OptrisOptrisDocumentation

Documentation/OTC SDK/Optris.Sdk — C# API referencev12.0

PaletteInfo

public sealed record PaletteInfo : IEquatable<PaletteInfo>

One palette this machine has.

PaletteInfo: constructors

public PaletteInfo(string Name, PaletteSource Source, string Path, Nullable<Palette> BuiltIn)

One palette this machine has.

  • Name: What it is called -- the stem of its file. Unlike Palettes.GetDisplayName(…) this is an identifier: it is stable, it is safe to persist, and every call on PaletteLibrary takes it back.
  • Source: Whether the colours come out of the SDK or off the disk.
  • Path: The file it was read from, or for a built-in the shipped CSV that holds the same colours. Empty when no file was found -- for a built-in that is the sign of an incomplete installation, and the palette still works, because the compiled table does not depend on the file being there.
  • BuiltIn: The Palette this name belongs to, or null for a palette an operator added. Persist this rather than the name when it is available: it is one integer and it cannot go missing.

PaletteInfo: properties

public Nullable<Palette> BuiltIn { get; init; }

The Palette this name belongs to, or null for a palette an operator added. Persist this rather than the name when it is available: it is one integer and it cannot go missing.

public string Name { get; init; }

What it is called -- the stem of its file. Unlike Palettes.GetDisplayName(…) this is an identifier: it is stable, it is safe to persist, and every call on PaletteLibrary takes it back.

public string Path { get; init; }

The file it was read from, or for a built-in the shipped CSV that holds the same colours. Empty when no file was found -- for a built-in that is the sign of an incomplete installation, and the palette still works, because the compiled table does not depend on the file being there.

public PaletteSource Source { get; init; }

Whether the colours come out of the SDK or off the disk.