Example #1
0
        public void ConnectSetup(Step rootStep)
        {
            if (vsDevice == null || jobStep == null)
            {
                if (ConnectionEventCallback != null)
                {
                    ConnectionEventCallback.Invoke(Enum_ConnectionEvent.ERROR, "ERROR: Device or Job not found!");
                }
                return;
            }
            if (setupManager == null)
            {
                setupManager = new SetupManager();
            }

            if (vsDevice.IsAnyInspectionRunning)
            {
                vsDevice.StopAll();
            }

            if (rootStep == null)
            {
                IAvpCollection inspStepCol = jobStep.FindByType("Step.Inspection.1");
                setupManager.RootStep = inspStepCol[1] as Step;
            }
            else
            {
                setupManager.RootStep = rootStep;
            }

            setupManager.OptionLayoutSet(SetupManagerLayoutOptions.ShowEverything, true);
            setupManager.OptionLayoutSet(SetupManagerLayoutOptions.ShowDatumGrid, false);
            setupManager.OptionLayoutSet(SetupManagerLayoutOptions.ShowStepTree, false);
            setupManager.ZoomAuto();
            setupManager.Acquire();
        }