TimeSerialItem

Creates a Time serial item that will be used to represent a timein serial number marking.

 

Properties

CodeFormat Gets or Sets the formatting string used to format the output text.
IncrementHours Gets or Sets the number of hours that should be added to calculate a new time.
IncrementMinutes Gets or Sets the number of minutes that should be added to calculate a new time
IncrementSeconds Gets or Sets the number of seconds that should be added to calculate a new time
Hour Gets or Sets the Hour component of the time serial item.
Minute Gets or Sets the Minute component of the time serial item.
Second Gets or Sets the Second component of the time serial item.
UseCurrentTime Gets or Sets whether the current time should be used for this time serial item.

 

Example

Copy
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

vectorImage.SetJumpSpeed(2000);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetMarkDelay(200);
vectorImage.SetJumpDelay(150);

//Create serial number
SerialNumber serialVar1 = new SerialNumber("serialVar");

//Add serialNumber to scandocument
scanDocument.AddSerialNumberVariable(serialVar1);

// Time Serial Item
TimeSerialItem timeSerialItem = new TimeSerialItem(02, 02, 02);

// To print time as "Time: 02:02:02" use the following code format
timeSerialItem.CodeFormat = "Time: [hh]:[mm]:[ss]";

// Use current time
timeSerialItem.UseCurrentTime = false;

serialVar1.SerialItemList.Add(timeSerialItem);

//Save serialization instance data to SMC
scanDocument.IsSaveAndUseSerailizationState = true;

//Time to expire the serialization instance data
scanDocument.SerailizationStateSaveDataExpirationTime = 1;

//Dynamic Text 
DynamicTextShape dynamicText = new DynamicTextShape();
dynamicText.Height = 5;
dynamicText.Location = new Point3D(0, 0, 0);
dynamicText.VariableName = "dynText1";
dynamicText.Text = " ";
dynamicText.EvaluateVariableTags = true;
dynamicText.FontName = "Arial";
dynamicText.CharacterGap = 0;
dynamicText.ScaleX = 1;
dynamicText.ScaleY = 1;
dynamicText.Angle = 0;

// Embed Font  
Collection<UnicodeRange> unicodeRanges = new Collection<UnicodeRange>();
UnicodeRange unicodeRange = new UnicodeRange();
unicodeRange.StartingCharacter = Convert.ToChar(0x00);
unicodeRange.EndingCharacter = Convert.ToChar(0xff);    // Characters from 0 to 255 or basically extended ASCII range is embedded
unicodeRanges.Add(unicodeRange);
scanDocument.EmbedFont("Arial", FontStyle.Regular, unicodeRanges); 

vectorImage.AddDynamicText(dynamicText, new SerialNumberEx(serialVar1));

scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));