Interface INCLabel
The INCLabel is a special object that allows writing to an arbitrary location in the output file (at the beginning or middle, not just at the end). The label points to a specific position within the output file. When editing a file, the label moves with the text. When adding new data to a file, you can use labels to specify where the data should be inserted.
Use CreateLabel() method to create new label that points to the current position in a file.
When calling the Write(string, INCLabel) or WriteLine(string, INCLabel) methods, simply provide a label in the parameters, or you can use the DefaultLabel property to specify the default position at which to insert new text.
Namespace: SprutCAMTech.SCPostprocessor
Assembly: SprutCAMTech.SCPostprocessor.dll
Syntax
public interface INCLabel : IDisposable
Properties
Comment
The Comment property you can use for your own purposes. You can write here any textual information associated with the label.
Declaration
string Comment { get; set; }
Property Value
Type | Description |
---|---|
string |
Data
The Data property you can use for your own purposes. You can write here any kind of information associated with the label. For example you can create your own class containing different fields you need. After that you can assign the object of this class to the Data property of a label.
Declaration
object Data { get; set; }
Property Value
Type | Description |
---|---|
object |
SnapMode
Snap mode for the INCLabel object. It determines whether the label should be shifted to the right or left when inserting text into the given label.
Declaration
NCLabelSnapMode SnapMode { get; set; }
Property Value
Type | Description |
---|---|
NCLabelSnapMode |
Methods
SnapToLeft()
Changes the SnapMode property to the Left value. When the snap mode is Left the label will remain to the left of the pasted text, correspondingly, the text will be added to the right of the label.
Declaration
void SnapToLeft()
SnapToRight()
Changes the SnapMode property to the Right value. When the snap mode is Right the label will remain to the right of the pasted text, correspondingly, the text will be added to the left of the label.
Declaration
void SnapToRight()