ScanDocument CopyNonScanningParameters
Duplicates the content of a source ScanDocument into the current ScanDocument, excluding the vector images. This operation copies all the scripts, variables, and laser parameters, including the before and after laser parking states.
| public void CopyNonScanningParameters(ScanDocument source) |
Return value
| void |
Parameters
| ScanDocument | source | The source ScanDocument from which the data will be copied |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
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", "StartLogging(\"192.168.137.1\", 5032)\r\n ScanAll()\r\nLaser.WaitForEnd()"));
try
{
scanDocument.StartScanning();
}
catch
{
}
// Create a new scan Document and make a copy of the previous Scan document without vector images
ScanDocument newScandocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
newScandocument.CopyNonScanningParameters(scanDocument);
}