• Articles
  • Api Documentation
Show / Hide Table of Contents
  • DotnetPostprocessing.SDK
    • ArcBreakMode
    • ArcSettings
    • BrakeAxesEnumerator
    • CLDArray
    • CLDAxisBrake
    • CLDCmdType
    • CLDCmdTypeExtensions
    • CLDConst
    • CLDCycle
    • CLDEDMMotionMode
    • CLDFeedKind
    • CLDFeedUnits
    • CLDFileType
    • CLDInterpMode
    • CLDMultiMotionAxis
    • CLDOriginPositionMode
    • CLDOriginType
    • CLDPlaneType
    • CLDRotationDir
    • CLDSpindleAction
    • CLDSpindleSpeedMode
    • CLDThreadOrient
    • CLDThreadUnits
    • CodeParamType
    • CommonFuncs
    • CountingNCWord
    • EDMRollMode
    • EPostprocessorException
    • IArrayNamedPropertyIndexer
    • IBinaryNCStorage
    • IBooleanNamedPropertyIndexer
    • ICLDAxesBrakeCommand
    • ICLDBrakeAxesIndexer
    • ICLDCircleCommand
    • ICLDClampCommand
    • ICLDCommand
    • ICLDCommentCommand
    • ICLDCoolantCommand
    • ICLDCoolantTubeIndexer
    • ICLDCutComCommand
    • ICLDCycleCommand
    • ICLDDelayCommand
    • ICLDEDMMoveCommand
    • ICLDEDMMoveSpan
    • ICLDEffectorCommand
    • ICLDExtCycleCommand
    • ICLDFeedrateCommand
    • ICLDFile
    • ICLDFileCmdIndexer
    • ICLDFileList
    • ICLDFiniCommand
    • ICLDFromCommand
    • ICLDGoHomeCommand
    • ICLDGotoCommand
    • ICLDInsertCommand
    • ICLDInterpolationCommand
    • ICLDLoadToolCommand
    • ICLDMachineAxesIndexer
    • ICLDMachineAxisInfo
    • ICLDMachineInfo
    • ICLDMachiningTool
    • ICLDMotionCommand
    • ICLDMoveVelocityCommand
    • ICLDMultiArcCommand
    • ICLDMultiArcPoint
    • ICLDMultiAxisArray
    • ICLDMultiGotoCommand
    • ICLDMultiMotionAxesIndexer
    • ICLDMultiMotionCommand
    • ICLDOpStopCommand
    • ICLDOriginCommand
    • ICLDPPFunCommand
    • ICLDPartNoCommand
    • ICLDPhysicGotoCommand
    • ICLDPlaneCommand
    • ICLDPowerCommand
    • ICLDPrintCommand
    • ICLDProject
    • ICLDRapidCommand
    • ICLDSelWorkpieceCommand
    • ICLDSinglePassThreadCommand
    • ICLDSpindleCommand
    • ICLDStopCommand
    • ICLDStructureCommand
    • ICLDSub
    • ICLDSubList
    • ICLDSyncAxesCommand
    • ICLDSyncWaitCommand
    • ICLDTLContactCommand
    • ICLDTakeoverCommand
    • ICLDTechOperation
    • ICLDTechOperationList
    • ICLDTranslator
    • ICodeParametersOfCLDCommand
    • ICodeParametersOfCLDCommandBooleanIndexer
    • ICodeParametersOfCLDCommandFloatIndexer
    • ICodeParametersOfCLDCommandIntegerIndexer
    • ICodeParametersOfCLDCommandStringIndexer
    • IFloatNamedPropertyIndexer
    • IInputBox
    • IInputBoxEnumValuesList<T>
    • IInputBoxFactory
    • IInputBoxProperty
    • IIntegerNamedPropertyIndexer
    • INCBlockOwner
    • INCFileOwner
    • INCLabel
    • INCStorage
    • INCStorageManager
    • INamedPropertiesCollection
    • INamedProperty
    • INamedPropertyIndexer
    • IPPFunTechInfo
    • IPPFunTechInfoPart
    • IPPFunTechInfoSetupStage
    • IPPFunTechInfoTool
    • IPPFunTechInfoWorkpiece
    • IPostprocessingLogReceiver
    • IStringNamedPropertyIndexer
    • ITextNCStorage
    • IToolGeometry
    • InitNamesProc
    • InpArray<T>
    • InpNumber
    • InputBoxEnumValuesFormer<T>
    • InputBoxValueSetter<T>
    • Log
    • LogMessageType
    • MsgBtnSet
    • MsgClickedBtn
    • MsgDefBtn
    • MsgType
    • MultiMotionAxesEnumerator
    • NCBlock
    • NCBlockWordsEnumerator
    • NCLabelSnapMode
    • NCWord
    • NCWordDecPoint
    • NCWordSign
    • NCWordState
    • NCWordTextCase
    • NamedParamType
    • NamedPropIterator
    • NumericNCWord
    • PostprocessorSettings
    • TBinaryNCFile
    • TExternalNCFile
    • TInp2DPoint
    • TInp3DPoint
    • TInp5DPoint
    • TInpComplexRotationConvention
    • TInpLocation
    • TInpQuaternion
    • TInpRotation
    • TInpRotationConvention
    • TNCFile
    • TNCFilesManager
    • TNCStorageType
    • TPostprocessor
    • TSimpleTextNCFile
    • TTextNCFile
    • TextNCWord
    • TrailingZeroesMode
    • TranslitPair
    • TransliterationTable
    • Transliterator
  • GeneralUtils.STDefLib
    • AngleUnits
    • STDef
  • Geometry.GeWatchDNClient
    • STGeWatch
    • STGeWatchClient
  • Geometry.VecMatrLib
    • EVecMatrLibError
    • GWConsts
    • ISTGeWatch
    • ISTGeWatchClient
    • ISTGeWatchable
    • T2DPoint
    • T3DArc
    • T3DCut
    • T3DMatrix
    • T3DPoint
    • T5DPoint
    • TComplexRotationConvention
    • TLocation
    • TQuaternion
    • TRotation
    • TRotationConvention
    • TRotationsConverter
    • VML
  • IPCUtils.SharedMemIPC
    • DelayedProcedure
    • HandleRequestProc
    • HandleStreamProc
    • IPCStream
    • SharedMemClient
    • SharedMemObject
    • SharedMemServer
    • SharememUtils
  • STTypes
    • IST_2DBox
    • IST_2DMatrix
    • IST_2DPoint
    • IST_3DBox
    • IST_3DMatrix
    • IST_3DPoint
    • IST_5DPoint
    • IST_MeasurableObject
    • IST_UpdateStamp
    • TST2DBox
    • TST2DLine
    • TST2DMatrix
    • TST2DPoint
    • TST2IPoint
    • TST2SPoint
    • TST3DBox
    • TST3DLine
    • TST3DMatrix
    • TST3DPoint
    • TST3DVec
    • TST3IPoint
    • TST3SMatrix
    • TST3SPoint
    • TST5DPoint
    • TSTLinearUnits
    • TSTSystemUnits
    • TST_LinearMeasure
    • enumTST_LinearMeasure
    • tagTST2DBox
    • tagTST2DLine
    • tagTST2DMatrix
    • tagTST2DPoint
    • tagTST2IPoint
    • tagTST2SPoint
    • tagTST3DBox
    • tagTST3DLine
    • tagTST3DMatrix
    • tagTST3DPoint
    • tagTST3IPoint
    • tagTST3SMatrix
    • tagTST3SPoint
    • tagTST5DPoint
    • tagTSTLinearUnits
    • tagTSTSystemUnits

Class TextNCWord

"TextNCWord", or in other words "Register", is an object that helps you quickly and conveniently convert string values to a text format that the CNC machine understands.

Optionally, TextNCWord can also help you to filter the output. It contains two values - current v and previous v0 (which has already been output earlier). If both of these values are the same, then re-output the value can be skipped automatically.

Inheritance
object
NCWord
TextNCWord
Inherited Members
NCWord.Hide()
NCWord.Show()
NCWord.Disable()
NCWord.State
NCWord.AutoUpdateState
NCWord.Unchanged
NCWord.Changed
NCWord.Disabled
NCWord.Address
NCWord.TailString
NCWord.Marked
Namespace: DotnetPostprocessing.SDK
Assembly: DotnetPostprocessing.SDK.dll
Syntax
public class TextNCWord : NCWord

Constructors

TextNCWord(string)

Creates a new instance of a TextNCWord and initializes its state.

Declaration
public TextNCWord(string defaultValue)
Parameters
Type Name Description
string defaultValue

Default value for the TextNCWord.

TextNCWord(string, NCWordTextCase)

Creates a new instance of a TextNCWord and initializes its state.

Declaration
public TextNCWord(string defaultValue, NCWordTextCase textCase)
Parameters
Type Name Description
string defaultValue

Default value for the TextNCWord.

NCWordTextCase textCase

Determines whether or not to convert the case of characters.

TextNCWord(string, string, string)

Creates a new instance of a TextNCWord and initializes its state.

Declaration
public TextNCWord(string address, string defaultValue, string tailString)
Parameters
Type Name Description
string address

First part of the NCWord's output string that will output directly without any changes. For example, if the NCWord has a format like "< X >{v}< /X >", then the Address is "< X >". An expression in curly braces is a part automatically formed from the value.

string defaultValue

Default value for the TextNCWord.

string tailString

Final part of the NCWord's output string that will output directly without any changes. For example, if the NCWord has a format like "< X >{v}< /X >", then the TailString is "< /X >". An expression in curly braces is a part automatically formed from the value.

TextNCWord(string, string, string, NCWordTextCase)

Creates a new instance of a TextNCWord and initializes its state.

Declaration
public TextNCWord(string address, string defaultValue, string tailString, NCWordTextCase textCase)
Parameters
Type Name Description
string address

First part of the NCWord's output string that will output directly without any changes. For example, if the NCWord has a format like "< X >{v}< /X >", then the Address is "< X >". An expression in curly braces is a part automatically formed from the value.

string defaultValue

Default value for the TextNCWord.

string tailString

Final part of the NCWord's output string that will output directly without any changes. For example, if the NCWord has a format like "< X >{v}< /X >", then the TailString is "< /X >". An expression in curly braces is a part automatically formed from the value.

NCWordTextCase textCase

Determines whether or not to convert the case of characters.

TextNCWord(string, string, string, NCWordTextCase, bool)

Creates a new instance of a TextNCWord and initializes its state.

Declaration
public TextNCWord(string address, string defaultValue, string tailString, NCWordTextCase textCase, bool autoUpdateState)
Parameters
Type Name Description
string address

First part of the NCWord's output string that will output directly without any changes. For example, if the NCWord has a format like "< X >{v}< /X >", then the Address is "< X >". An expression in curly braces is a part automatically formed from the value.

string defaultValue

Default value for the TextNCWord.

string tailString

Final part of the NCWord's output string that will output directly without any changes. For example, if the NCWord has a format like "< X >{v}< /X >", then the TailString is "< /X >". An expression in curly braces is a part automatically formed from the value.

NCWordTextCase textCase

Determines whether or not to convert the case of characters.

bool autoUpdateState

The "AutoUpdateState" property determines whether the NCWordState should be automatically updated when the current v or previous v0 value changes.

Fields

defaultValue

Default value for the TextNCWord.

Declaration
protected string defaultValue
Field Value
Type Description
string

Properties

DefaultValue

Default value for the TextNCWord.

Declaration
public string DefaultValue { get; set; }
Property Value
Type Description
string

TextCase

Determines whether or not to convert the case of characters.

Declaration
public NCWordTextCase TextCase { get; set; }
Property Value
Type Description
NCWordTextCase

Unstable

Returns "True" if the TextNCWord is in the so-called "Unstable" state after the call of Reset() method. Actually it checks that the previous v0 value is equal to the "undefined" value ("null" for the TextNCWord). This state means that the TextNCWordwill NOT output on the next call of Out() or Form(). But it will output just after the first change of the current v value.

Declaration
public override bool Unstable { get; }
Property Value
Type Description
bool
Overrides
NCWord.Unstable

ValuesDiffer

The property is "True" only if the current value v and the previous value v0 form a different output string.

Declaration
public override bool ValuesDiffer { get; }
Property Value
Type Description
bool
Overrides
NCWord.ValuesDiffer

ValuesSame

The property is "True" only if the current value v and the previous value v0 form a completely identical output string.

Declaration
public override bool ValuesSame { get; }
Property Value
Type Description
bool
Overrides
NCWord.ValuesSame

v

Current value of the TextNCWord. When you set the value it usually automatically updates the State depend on equality with the previous v0 value.

Declaration
public string v { get; set; }
Property Value
Type Description
string

v0

Previous value of the TextNCWord that has already been output. When you set the previous value it usually automatically updates the State depend on equality with the current v value.

Declaration
public string v0 { get; set; }
Property Value
Type Description
string

Methods

Hide(string)

Switches the TextNCWord to the Unchanged state and assigns the specified value to the current v value. It means that the TextNCWordwill NOT output on the next call of Out() or Form() but it will contain the specified value.

It doesn't change the previous v0 value of the TextNCWord.

Later you can use the UpdateState() method to restore the changed-unchanged state depend on equality ot the v and v0.

Declaration
public void Hide(string value)
Parameters
Type Name Description
string value

The value to assign to the current v value of the TextNCWord

Init()

This method initializes an internal state of the TextNCWord just after creation.

Declaration
protected override void Init()
Overrides
NCWord.Init()

Reset()

Switches the TextNCWord to the Unchanged state and changes the previous v0 value to an undefined value ("null" for the TextNCWord). It means that the TextNCWordwill NOT output on the next call of Out() or Form(). But it will output just after the first change of the current v value.

It is the so-called "Unstable" state.

It doesn't change the current v value of the TextNCWord.

Later you can use the UpdateState() method to restore the changed-unchanged state depend on equality ot the v and v0.

Declaration
public override void Reset()
Overrides
NCWord.Reset()

Reset(string)

Switches the TextNCWord to the Unchanged state and changes the previous v0 value to an undefined value ("null" for the TextNCWord). It means that the TextNCWordwill NOT output on the next call of Out() or Form(). But it will output just after the first change of the current v value.

It is the so-called "Unstable" state.

The current v value of the TextNCWord will contain the value you specifiad as the DotnetPostprocessing.SDK.TextNCWord.value parameter.

Later you can use the UpdateState() method to restore the changed-unchanged state depend on equality ot the v and v0.

Declaration
public void Reset(string value)
Parameters
Type Name Description
string value

The value to assign to the current v value of the TextNCWord

RestoreDefaultValue(bool)

Assigns the DefaultValue of the TextNCWord to its current v and previous v0 values. Depend on the specified show parameter it switches the state to Unchanged or Changed value.

Declaration
public override void RestoreDefaultValue(bool show)
Parameters
Type Name Description
bool show

You need to specify "true" if you want to show the TextNCWord on the next call of Out() or Form(). Otherwise you need to specify "false" and it will hide the TextNCWord from the next output.

Overrides
NCWord.RestoreDefaultValue(bool)

Show(string)

Switches the TextNCWord to the Changed state and assigns the specified value to the current v value. It means that the NCWordwill output on the next call of Out() or Form().

It doesn't change the previous v0 value of the NCWord.

Declaration
public void Show(string value)
Parameters
Type Name Description
string value

The value to assign to the current v value of the TextNCWord

ToString()

Converts the current v value of the TextNCWord to the output string using all the rules of formatting like in calls of Out() or Form(). But this method does not check the State of the TextNCWord (changed it or not), so you will get the output string anyway.

Declaration
public override string ToString()
Returns
Type Description
string

Returns the current v value with all the formatting rules defined for the TextNCWord (Address, TailString, TextCase, etc.)

ToString(string)

Converts the specified value to the output string using all the rules of formatting like in calls of Out() or Form(). But this method does not check the State of the TextNCWord (changed it or not), so you will get the output string anyway.

Declaration
public string ToString(string value)
Parameters
Type Name Description
string value

The value you need to format by the rules of the TextNCWord.

Returns
Type Description
string

Returns the specified value with all the formatting rules defined for the TextNCWord (Address, TailString, TextCase, etc.).

UpdateState()

Switches the State of the TextNCWord to Changed or Unchanged depend on the current v and previous v0 values. If the values are same then the state will "Unchanged", otherwise it will "Changed".

If the TextNCWord is Disabled or has the AutoUpdateState=false then the method does nothing.

Declaration
public override void UpdateState()
Overrides
NCWord.UpdateState()

Operators

implicit operator string(TextNCWord)

Converts automatically the TextNCWord to its current value.

Declaration
public static implicit operator string(TextNCWord tw)
Parameters
Type Name Description
TextNCWord tw
Returns
Type Description
string
In this article
Back to top Generated by DocFX