• Articles
  • Api Documentation
Show / Hide Table of Contents
  • SprutTechnology.GeWatchDNClient
    • STGeWatch
    • STGeWatchClient
  • SprutTechnology.SCPostprocessor
    • 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
    • ICLDPartNoCommand
    • ICLDPhysicGotoCommand
    • ICLDPlaneCommand
    • ICLDPowerCommand
    • ICLDPPFunCommand
    • ICLDPrintCommand
    • ICLDProject
    • ICLDRapidCommand
    • ICLDSelWorkpieceCommand
    • ICLDSinglePassThreadCommand
    • ICLDSpindleCommand
    • ICLDStopCommand
    • ICLDStructureCommand
    • ICLDSub
    • ICLDSubList
    • ICLDSyncAxesCommand
    • ICLDSyncWaitCommand
    • ICLDTakeoverCommand
    • ICLDTechOperation
    • ICLDTechOperationList
    • ICLDTLContactCommand
    • ICLDTranslator
    • ICodeParametersOfCLDCommand
    • ICodeParametersOfCLDCommandBooleanIndexer
    • ICodeParametersOfCLDCommandFloatIndexer
    • ICodeParametersOfCLDCommandIntegerIndexer
    • ICodeParametersOfCLDCommandStringIndexer
    • IFloatNamedPropertyIndexer
    • IInputBox
    • IInputBoxEnumValuesList<T>
    • IInputBoxFactory
    • IInputBoxProperty
    • IIntegerNamedPropertyIndexer
    • INamedPropertiesCollection
    • INamedProperty
    • INamedPropertyIndexer
    • INCBlockOwner
    • INCFileOwner
    • INCLabel
    • INCStorage
    • INCStorageManager
    • InitNamesProc
    • InpArray<T>
    • InpNumber
    • InputBoxEnumValuesFormer<T>
    • InputBoxValueSetter<T>
    • IPostprocessingLogReceiver
    • IPPFunTechInfo
    • IPPFunTechInfoTool
    • IPPFunTechInfoWorkpiece
    • IStringNamedPropertyIndexer
    • ITextNCStorage
    • IToolGeometry
    • Log
    • LogMessageType
    • MsgBtnSet
    • MsgClickedBtn
    • MsgDefBtn
    • MsgType
    • MultiMotionAxesEnumerator
    • NamedParamType
    • NamedPropIterator
    • NCBlock
    • NCBlockWordsEnumerator
    • NCLabelSnapMode
    • NCWord
    • NCWordDecPoint
    • NCWordSign
    • NCWordState
    • NCWordTextCase
    • NumericNCWord
    • PostprocessorSettings
    • TBinaryNCFile
    • TExternalNCFile
    • TextNCWord
    • TInp2DPoint
    • TInp3DPoint
    • TInp5DPoint
    • TInpComplexRotationConvention
    • TInpLocation
    • TInpQuaternion
    • TInpRotation
    • TInpRotationConvention
    • TNCFile
    • TNCFilesManager
    • TNCStorageType
    • TPostprocessor
    • TrailingZeroesMode
    • TransliterationTable
    • Transliterator
    • TranslitPair
    • TSimpleTextNCFile
    • TTextNCFile
  • SprutTechnology.STDefLib
    • AngleUnits
    • STDef
  • SprutTechnology.STMachiningToolsImportHelper
    • FinalizeMachiningToolsImportLib
    • GetMachiningToolsImportLibPointer
    • IMTI_AxialToolItemsExtension
    • IMTI_CustomAxialShapeToolExtension
    • IMTI_MachiningToolsImportLibraryExtension
    • IMTI_MachiningToolsItemExtension
    • IMTI_TurnToolItemsExtension
    • MTIMachiningToolsImportHelper
    • NativeLibLoader
    • TPlanarCurveReader
    • TPlanarCurveSpan
  • SprutTechnology.VecMatrLib
    • EVecMatrLibError
    • GWConsts
    • ISTGeWatch
    • ISTGeWatchable
    • ISTGeWatchClient
    • T2DPoint
    • T3DArc
    • T3DCut
    • T3DMatrix
    • T3DPoint
    • T5DPoint
    • TComplexRotationConvention
    • TLocation
    • TQuaternion
    • TRotation
    • TRotationConvention
    • TRotationsConverter
    • VML

Class CountingNCWord

The special case of the NumericNCWord which automatically increments (or decrements) the value of the register with the defined step after each call of Out() or Form().

The most useful application of this kind of register is blocks or lines numbering case.

Inheritance
System.Object
NCWord
NumericNCWord
CountingNCWord
Inherited Members
NumericNCWord.defaultValue
NumericNCWord.fWordBuilder
NumericNCWord.v
NumericNCWord.v0
NumericNCWord.DefaultValue
NumericNCWord.RestoreDefaultValue(Boolean)
NumericNCWord.DecimalSeparator
NumericNCWord.SignMode
NumericNCWord.PointMode
NumericNCWord.DigitsBeforePoint
NumericNCWord.DigitsAfterPoint
NumericNCWord.LeadingZeroes
NumericNCWord.TrailingZeroes
NumericNCWord.Show(Double)
NumericNCWord.Hide(Double)
NumericNCWord.Reset(Double)
NumericNCWord.Reset()
NumericNCWord.Unstable
NumericNCWord.UpdateState()
NumericNCWord.ValuesSame
NumericNCWord.ValuesDiffer
NumericNCWord.ToString()
NumericNCWord.ToString(Double)
NCWord.State
NCWord.AutoUpdateState
NCWord.Hide()
NCWord.Show()
NCWord.Disable()
NCWord.Unchanged
NCWord.Changed
NCWord.Disabled
NCWord.Address
NCWord.TailString
NCWord.Marked
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: SprutTechnology.SCPostprocessor
Assembly: SCPostprocessor.dll
Syntax
public class CountingNCWord : NumericNCWord

Constructors

CountingNCWord(String, Double, Double, Int32)

Creates a new instance of the CountingNCWord and initializes it with the specified set of parameters. It is used the "format" string parameter to define the all formatting rules for the NumericNCWord.

For example, the "format" parameter can be: "X = {-####!0##};". The formatting rules are below.

  1. The curly braces divide the expression into three parts.
  2. Anything to the left of the braces is assigned to the Address property and passed to the output line unchanged (here is "X = ").
  3. Anything to the right of the braces is assigned to the TailString property and also goes to the output string as it is (here is ";").
  4. The expression inside the braces defines the formatting rules applied to the current v value (here is "-####!0##"). It can only include these characters "-+.!_#0".
  5. If the first character in braces is "-", then the sign of the number will output only for negative numbers. It corresponds to SignMode property value Minus.
  6. If the first character in braces is "+", then the sign of the number will output both for positive and negative numbers. It corresponds to SignMode property value PlusAndMinus.
  7. If the first character in braces is not "+" or "-", then the sign of the number will not output at all. It corresponds to SignMode property value No.
  8. One of the characters ".!_" in curly braces separates the integer part from the fractional part and determines how to output the decimal point.
  9. The point "." means the optional output, so the decimal point will output for fractional numbers, and for integers it will be skipped. It corresponds to the property PointMode = No.
  10. An exclamation point "!" indicates a required output, so the decimal point will output both for fractional and integer numbers. It corresponds to the property PointMode = Always.
  11. The underscore "_" or the absence of any of the characters ".!_" at all means that the decimal point will never be output. It corresponds to the property PointMode = No.
  12. The number of characters "0" or "#" before the characters ".!_" indicates the number of characters allowed before the decimal point. It corresponds to the property DigitsBeforePoint.
  13. If at least one of the characters before the point is zero "0", then non-significant zeros are required. It corresponds to the property LeadingZeroes = true.
  14. If all characters before the point are "#", then non-significant zeros will not output. It corresponds to the property LeadingZeroes = false.
  15. The number of characters "0" or "#" after the characters ".!_" indicates the number of characters allowed after the decimal point. It corresponds to the property DigitsAfterPoint. The number will be rounded to the specified number of digits before output.
  16. If all characters after the point are "#", then non-significant zeros will not output. It corresponds to the property TrailingZeroes = No.
  17. If all characters after the point are "0", then non-significant zeros are required. It corresponds to the property TrailingZeroes = Yes.
  18. If the first character after the point is "0" and the rest are "#", then only first non-significant zero will output and the rest will be skipped. It corresponds to the property TrailingZeroes = OneOnly.
Declaration
public CountingNCWord(string format, double defaultValue, double AutoIncrementStep, int outFrequence)
Parameters
Type Name Description
System.String format

The string that defines the formatting rules for the NumericNCWord. For example: "X = {-####!0##};". See description of the constructor for more details.

System.Double defaultValue

The parameter to define a default value for the NumericNCWord. It is used to assing initial values to the current v and the previous v0 values just after creation of the NumericNCWord or when you call RestoreDefaultValue(Boolean) method manually.

System.Double AutoIncrementStep

The numerical step that automatically will be added to the v current value of the register after the each call of Out() or Form() methods.

System.Int32 outFrequence

Default value for the Frequence property that means the count of iteration (calls of Out() or Form() methods) after which the register will output the value instead of skipping it.

CountingNCWord(String, Double, Double, Int32, Boolean)

Creates a new instance of the CountingNCWord and initializes it with the specified set of parameters. It is used the "format" string parameter to define the all formatting rules for the NumericNCWord.

For example, the "format" parameter can be: "X = {-####!0##};". The formatting rules are below.

  1. The curly braces divide the expression into three parts.
  2. Anything to the left of the braces is assigned to the Address property and passed to the output line unchanged (here is "X = ").
  3. Anything to the right of the braces is assigned to the TailString property and also goes to the output string as it is (here is ";").
  4. The expression inside the braces defines the formatting rules applied to the current v value (here is "-####!0##"). It can only include these characters "-+.!_#0".
  5. If the first character in braces is "-", then the sign of the number will output only for negative numbers. It corresponds to SignMode property value Minus.
  6. If the first character in braces is "+", then the sign of the number will output both for positive and negative numbers. It corresponds to SignMode property value PlusAndMinus.
  7. If the first character in braces is not "+" or "-", then the sign of the number will not output at all. It corresponds to SignMode property value No.
  8. One of the characters ".!_" in curly braces separates the integer part from the fractional part and determines how to output the decimal point.
  9. The point "." means the optional output, so the decimal point will output for fractional numbers, and for integers it will be skipped. It corresponds to the property PointMode = No.
  10. An exclamation point "!" indicates a required output, so the decimal point will output both for fractional and integer numbers. It corresponds to the property PointMode = Always.
  11. The underscore "_" or the absence of any of the characters ".!_" at all means that the decimal point will never be output. It corresponds to the property PointMode = No.
  12. The number of characters "0" or "#" before the characters ".!_" indicates the number of characters allowed before the decimal point. It corresponds to the property DigitsBeforePoint.
  13. If at least one of the characters before the point is zero "0", then non-significant zeros are required. It corresponds to the property LeadingZeroes = true.
  14. If all characters before the point are "#", then non-significant zeros will not output. It corresponds to the property LeadingZeroes = false.
  15. The number of characters "0" or "#" after the characters ".!_" indicates the number of characters allowed after the decimal point. It corresponds to the property DigitsAfterPoint. The number will be rounded to the specified number of digits before output.
  16. If all characters after the point are "#", then non-significant zeros will not output. It corresponds to the property TrailingZeroes = No.
  17. If all characters after the point are "0", then non-significant zeros are required. It corresponds to the property TrailingZeroes = Yes.
  18. If the first character after the point is "0" and the rest are "#", then only first non-significant zero will output and the rest will be skipped. It corresponds to the property TrailingZeroes = OneOnly.
Declaration
public CountingNCWord(string format, double defaultValue, double AutoIncrementStep, int outFrequence, bool preserveIndent)
Parameters
Type Name Description
System.String format

The string that defines the formatting rules for the NumericNCWord. For example: "X = {-####!0##};". See description of the constructor for more details.

System.Double defaultValue

The parameter to define a default value for the NumericNCWord. It is used to assing initial values to the current v and the previous v0 values just after creation of the NumericNCWord or when you call RestoreDefaultValue(Boolean) method manually.

System.Double AutoIncrementStep

The numerical step that automatically will be added to the v current value of the register after the each call of Out() or Form() methods.

System.Int32 outFrequence

Default value for the Frequence property that means the count of iteration (calls of Out() or Form() methods) after which the register will output the value instead of skipping it.

System.Boolean preserveIndent

Default value for the PreserveIndent property that tries to preserve indentation when register's output is skipped due to Frequency property is greater than 1.

CountingNCWord(String, String, NCWordSign, NCWordDecPoint, Int32, Int32, Double, Double, Int32, Boolean)

Creates a new instance of a CountingNCWord register with the given parameters.

Declaration
public CountingNCWord(string address, string tailString, NCWordSign signMode, NCWordDecPoint pointMode, int digitsBefore, int digitsAfter, double defaultValue, double AutoIncrementStep, int outFrequence, bool autoUpdateState)
Parameters
Type Name Description
System.String address

Address - start part of the register's output string.

System.String tailString

TailString - final part of the register's output string.

NCWordSign signMode

SignMode - defines how to output the sign of the number.

NCWordDecPoint pointMode

PointMode - defines how to output the decimal point of the number.

System.Int32 digitsBefore

DigitsBeforePoint - count of digits before decimal point of the number.

System.Int32 digitsAfter

DigitsAfterPoint - count of digits after decimal point of the number.

System.Double defaultValue

DefaultValue - default value of the register.

System.Double AutoIncrementStep

The numerical step that automatically will be added to the v current value of the register after the each call of Out() or Form() methods.

System.Int32 outFrequence

Default value for the Frequence property that means the count of iteration (calls of Out() or Form() methods) after which the register will output the value instead of skipping it.

System.Boolean autoUpdateState

AutoUpdateState - determines whether the State should be automatically updated when the current v or previous v0 value changes.

Fields

fFrequenceCounter

The counter for the Frequence property.

Declaration
protected int fFrequenceCounter
Field Value
Type Description
System.Int32

Properties

AutoIncrementStep

The amount by which the current register value v is increased after each call of Out() or Form().

Declaration
public double AutoIncrementStep { get; set; }
Property Value
Type Description
System.Double

Frequence

The number of Out() or Form() method calls after which the register will be included in the output line of the NCBlock, and will not be skipped. If it is one then it will be presented in each output. If it is two then it will be presented in each second output etc.

Declaration
public int Frequence { get; set; }
Property Value
Type Description
System.Int32

FrequenceReached

This property is "true" only if the Frequence counter has reached the limit value and the value of this CountingNCWord will be presented in the next call of Out() or Form() methods.

Declaration
public bool FrequenceReached { get; }
Property Value
Type Description
System.Boolean

PreserveIndent

If this property is "true" then when the Frequence of the CountingNCWord is more than 1 and when the value of this register will be skipped then it will form spaces instead of the actual value of the register to preserve indents in the output line of the NCBlock.

Declaration
public bool PreserveIndent { get; set; }
Property Value
Type Description
System.Boolean

Methods

Init()

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

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

ResetFrequenceCounter()

Resets the internal counter of the Frequence property to the default state to start the counting again.

Declaration
public void ResetFrequenceCounter()
In This Article
Back to top Generated by DocFX