示例#1
0
        public void Execute(IPCBIWindow parent)
        {
            //only for current step
            IStep step = parent.GetCurrentStep();

            List <INet> allNets           = step.GetNets();
            IODBLayer   topSignal         = step.GetOutsideODBLayer(true);
            IODBLayer   botSignal         = step.GetOutsideODBLayer(false);
            int         countDifferentces = 0;

            foreach (INet net in allNets)
            {
                foreach (INetObject cmpPinCombi in net.ComponentList)
                {
                    IPin pinRel = cmpPinCombi.ICMP.GetPin(cmpPinCombi.PinIndex);

                    string netName = pinRel.GetNetNameOnIPin(cmpPinCombi.ICMP);

                    IODBObject relPad = pinRel.GetIPinPad(cmpPinCombi.ICMP.PlacedTop?topSignal:botSignal, cmpPinCombi.ICMP);

                    if (relPad != null && relPad.NetName != netName)
                    {
                        pinRel.SetPinColor(Color.AliceBlue, cmpPinCombi.ICMP);
                        countDifferentces++;
                    }
                    else
                    {
                        pinRel.SetPinColor(Color.BurlyWood, cmpPinCombi.ICMP);
                    }
                }
            }

            //you can add some code to show a report by using countDifferentces

            parent.UpdateView();
        }