public void Execute(IPCBIWindow parent) { RectangleF boundsJob = parent.GetJobBounds(); if (boundsJob.IsEmpty) { IStep step = parent.GetCurrentStep(); if (step == null) { return; } boundsJob = step.GetBounds(); if (boundsJob.IsEmpty) { IMatrix matrix = parent.GetMatrix(); if (matrix == null) { return; } RectangleD boundsLayerCombination = new RectangleD(); //check signal layers foreach (string layerName in step.GetAllLayerNames()) { if (matrix.IsSignalLayer(layerName)) { IODBLayer odbLayer = (IODBLayer)step.GetLayer(layerName); RectangleF layerBounds = odbLayer.GetBounds(); boundsLayerCombination = IMath.AddRectangleD(boundsLayerCombination, new RectangleD(layerBounds)); } } boundsJob = boundsLayerCombination.ToRectangleF(); } } MessageBox.Show("The Job has following bounds in mils:" + Environment.NewLine + " X " + boundsJob.X.ToString() + " ; Y " + boundsJob.Y.ToString() + " ; width " + boundsJob.Width + " ; height " + boundsJob.Height, "Job Bounds", MessageBoxButtons.OK, MessageBoxIcon.Information); }