Options
All
  • Public
  • Public/Protected
  • All
Menu

External module environment

Introduction

The piweb.environment module provides information about the element and its properties, as well as global settings. It also contains classes that are used by the functions of the piweb.format module.

import * as piweb from 'piweb';
import environment = piweb.environment;
see

format

Index

Type aliases

AngleUnit

AngleUnit: "degreeDecimal" | "degreeMinuteSecond" | "radian"

LengthUnit

LengthUnit: "mm" | "inch"

LimitType

LimitType: "tolerance" | "warning" | "control" | "scrap"

LimitUsageReference

LimitUsageReference: "nominal" | "middleOfTolerance"

Variables

Private LocalNativeTimeZone

LocalNativeTimeZone: any = provider.LocalTimeZone

apiVersion

apiVersion: string = provider.ApiVersion

Gets the semantic version of the plot extension API that is used to host the plot.

Private cachedLimitsConfiguration

cachedLimitsConfiguration: LimitsConfiguration | undefined

Private cachedLimitsConfigurationToken

cachedLimitsConfigurationToken: any

clientString

clientString: string = provider.ClientString

Gets the name of the hosting PiWeb client.

clientVersion

clientVersion: string = provider.ClientVersion

Gets the version of the hosting PiWeb client.

Private currentNativeCulture

currentNativeCulture: any = provider.CurrentCulture

Private currentNativeRegion

currentNativeRegion: any = provider.CurrentRegion

Private provider

provider: any = require.binding('EnvironmentProvider')

variableName

variableName: string = provider.VariableName

If the extensions defined multiple variables in the package.json manifest file, this property can be used to find out which one the user picked.

Functions

getAngleUnit

  • Returns prefered display unit of angles. This can be configured in the settings menu of Piweb Designer and PiWeb Monitor.

    Returns AngleUnit

getDecimalPlaces

  • getDecimalPlaces(): number
  • Returns prefered number of decimal places of displayed values. This can be configured in the settings menu of Piweb Designer and PiWeb Monitor. Use this only as a fallback value in case no prefered number of decimal places is configured for the displayed characteristic by attribute K2022.

    Returns number

getLengthUnit

  • Returns prefered display unit of length. This can be configured in the settings menu of Piweb Designer and PiWeb Monitor.

    Returns LengthUnit

getLimitsConfiguration

Private mapAngleUnit

  • mapAngleUnit(angleUnit: AngleUnitId.DegreeDecimal | AngleUnitId.DegreeMinuteSecond | AngleUnitId.Radian): AngleUnit
  • Parameters

    • angleUnit: AngleUnitId.DegreeDecimal | AngleUnitId.DegreeMinuteSecond | AngleUnitId.Radian

    Returns AngleUnit

Private mapLengthUnit

  • mapLengthUnit(lengthUnit: LengthUnitId.Mm | LengthUnitId.Inch): LengthUnit
  • Parameters

    • lengthUnit: LengthUnitId.Mm | LengthUnitId.Inch

    Returns LengthUnit

Private mapLimitType

  • mapLimitType(id: LimitTypeId.Tolerance | LimitTypeId.Warning | LimitTypeId.Control | LimitTypeId.Scrap): LimitType
  • Parameters

    • id: LimitTypeId.Tolerance | LimitTypeId.Warning | LimitTypeId.Control | LimitTypeId.Scrap

    Returns LimitType

Private mapLimitUsageReference

  • mapLimitUsageReference(id: LimitUsageReferenceId.Nominal | LimitUsageReferenceId.MiddleOfTolerance): LimitUsageReference
  • Parameters

    • id: LimitUsageReferenceId.Nominal | LimitUsageReferenceId.MiddleOfTolerance

    Returns LimitUsageReference

Private readLimitConfiguration

Generated using TypeDoc