ScanDocument BeforeStart

Get or set the starting state of the scanning system prior to initiating a laser scanning process. This functionality allows you to control the initial positions of the laser beam and the desired laser states before commencing a marking job.

public ScanningStartingState BeforeStart {get;set}

 

Return value

ScanningStartingState Starting state of the marking system

 

Example

Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);

ScanningStartingState startingState = new ScanningStartingState();
startingState.ResetLaserOn = true;

scanDocument.BeforeStart = startingState;

if (scanDocument != null)
{
    VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

    vectorImage.SetMarkSpeed(1000);
    vectorImage.SetJumpSpeed(2000);
    vectorImage.SetJumpDelay(100);
    vectorImage.SetMarkDelay(100);

    //Set Laser Delays
    vectorImage.SetLaserOnDelay(10);
    vectorImage.SetLaserOffDelay(10);

    CircleShape circleShape = new CircleShape();
    circleShape.CenterPoint.X = 0.0f;
    circleShape.CenterPoint.Y = 0.0f;
    circleShape.CenterPoint.Z = 0.0f;
    circleShape.Clockwise = true;
    circleShape.Radius = 10;
    circleShape.StartAngle = 0;
    circleShape.MaximumSegmentationError = 0.001f;

    vectorImage.AddCircle(circleShape);

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

    try
    {
        scanDocument.StartScanning();
    }
    catch
    {

    }
}