Example #1
0
        public void ribCB_Basislayer_Initialized(object sender, EventArgs e)
        {
            RibbonCombo ribCombo = (RibbonCombo)sender;

            myRegistry.regIO objRegistry = new myRegistry.regIO();
            string           Basislayer  = (string)objRegistry.readValue("blocks", "Basislayer");

            //Basislayer
            myAutoCAD.myLayer objLayer = myAutoCAD.myLayer.Instance;
            objLayer.refresh();
            objLayer.checkLayer(Basislayer, true);

            foreach (LayerTableRecord ltr in objLayer.lsLayerTableRecord)
            {
                string layName = ltr.Name;
                if (layName.Length > 2)
                {
                    if (layName.Substring(layName.Length - 2, 2) == "-P")
                    {
                        RibbonLabel ribLabel = new RibbonLabel();
                        ribLabel.Text = layName;
                        ribCombo.Items.Add(ribLabel);

                        if (ribLabel.Text == Basislayer)
                        {
                            ribCombo.Current = ribLabel;
                        }
                    }
                }
            }
        }
Example #2
0
        //Zeichnung aktiviert
        public void docColDocAct(object senderObj, DocumentCollectionEventArgs docColDocAcrEvtArgs)
        {
            myRegistry.regIO objRegIO   = new myRegistry.regIO();
            string           Basislayer = (string)objRegIO.readValue("blocks", "Basislayer");

            myAutoCAD.myLayer objLayer = myAutoCAD.myLayer.Instance;
            objLayer.refresh();
        }
Example #3
0
        void ribCB_Basislayer_DropDownOpened(object sender, EventArgs e)
        {
            RibbonCombo ribCombo = (RibbonCombo)sender;

            myAutoCAD.myLayer objLayer = myAutoCAD.myLayer.Instance;
            objLayer.refresh();
            List <string> lsPunktlayer = new List <string>();

            foreach (LayerTableRecord ltr in objLayer.lsLayerTableRecord)
            {
                string layName = ltr.Name;
                if (layName.Length > 2)
                {
                    if (layName.Substring(layName.Length - 2, 2) == "-P")
                    {
                        lsPunktlayer.Add(layName);
                    }
                }
            }
        }