public void ChecarCables()
        {
            Editor   ed = Application.DocumentManager.MdiActiveDocument.Editor;
            ObjectId compId;

            if (Selector.Entity("Selecciona una compuerta", out compId))
            {
                Compuerta cmp = this.Compuertas.FirstOrDefault(x => x.Value.Block.ObjectId == compId).Value;
                cmp.InitBox();
                ObjectId cableAId     = cmp.Search("INPUTA").OfType <ObjectId>().FirstOrDefault(),
                         cableBId     = cmp.Search("INPUTB").OfType <ObjectId>().FirstOrDefault();
                TransactionWrapper tr = new TransactionWrapper();
                tr.Run(TestConnectionTask, cmp, cableAId, cableBId);
            }
        }
Beispiel #2
0
        public void Connect()
        {
            Editor   ed = Application.DocumentManager.MdiActiveDocument.Editor;
            ObjectId inpId, outId;
            Point3d  pt1;

            if (Selector.Entity("\nSelecciona un pulso", typeof(Polyline), out inpId) &&
                Selector.Entity("Selecciona una Entrada", out outId, out pt1))
            {
                Compuerta cmp = Commands.Compuertas.FirstOrDefault(x => x.Value.Block.ObjectId == outId).Value;
                cmp.InitBox(cmp.Name);
                ObjectId cableAId     = cmp.Search("INPUTA").OfType <ObjectId>().FirstOrDefault(),
                         cableBId     = cmp.Search("INPUTB").OfType <ObjectId>().FirstOrDefault();
                TransactionWrapper tr = new TransactionWrapper();
                tr.Run(ConnectionTask, cmp, cableAId, cableBId, pt1, inpId);
            }
        }
Beispiel #3
0
        public void ConnectFC()
        {
            Editor   ed = Application.DocumentManager.MdiActiveDocument.Editor;
            ObjectId inpId, outId;
            Point3d  pt1, pt2;

            if (Selector.Entity("\nSelecciona VCC o GND ", out inpId, out pt1) &&
                Selector.Entity("\nSelecciona la entrada de conexión", out outId, out pt2))
            {
                Compuerta cmp  = Compuertas.FirstOrDefault(x => x.Value.Block.ObjectId == outId).Value;
                Input     inpB = Entradas.FirstOrDefault(x => x.Value.Block.ObjectId == inpId).Value;
                cmp.InitBox(cmp.Name);
                inpB.InitBox(inpB.Name);
                ObjectId cableAId     = cmp.Search("INPUTA").OfType <ObjectId>().FirstOrDefault(),
                         cableBId     = cmp.Search("INPUTB").OfType <ObjectId>().FirstOrDefault(),
                         outputId     = inpB.Search("OUTPUT").OfType <ObjectId>().FirstOrDefault();
                TransactionWrapper tr = new TransactionWrapper();
                tr.Run(ConnectionTask3, cmp, inpB, pt1, pt2, cableAId, cableBId, outputId);
            }
        }