Example #1
0
        public void UPDATEATTRIBUTE()
        {
            //CloseDocuments();
            var ExcelReader         = new ExcelFileReader(FilePath);
            var Settings            = ExcelReader.ReadFile();
            DocumentCollection docs = Application.DocumentManager;
            var DM = new DrawingManager();

            foreach (var drawing in Settings.DrawingData)
            {
                if (drawing.ToBeUpdated)
                {
                    string filePath = drawing.FolderPath + "\\" + drawing.DrawingName + ".dwg";

                    //Open drawings
                    DM.OPENDRAWING(filePath);

                    //set drawing active
                    DM.ACTIVATEDRAWING(filePath);

                    //update Attribute
                    var CA = new ChangeAttributes();
                    CA.UPDATEATTRIBUTES(Settings, drawing);

                    //save
                    DM.SAVEDRAWING(filePath);

                    //close
                    DM.CLOSEDRAWING(filePath);
                }
            }
        }
Example #2
0
        public void MOVEREVISIONLINE()
        {
            var ExcelReader = new ExcelFileReader(FilePath);
            var Settings    = ExcelReader.ReadFile();

            MoveRevLineView MRLV = new MoveRevLineView(Settings, this);

            MRLV.Show();
        }
        public void REMOVEREVISIONLINE()
        {
            var ExcelReader         = new ExcelFileReader(FilePath);
            var Settings            = ExcelReader.ReadFile();
            DocumentCollection docs = Application.DocumentManager;
            var revToDel            = "";
            var DM = new DrawingManager();

            revToDel = Interaction.InputBox("Enter revision to remove", "Remove revision");

            if (revToDel == "")
            {
                Application.ShowAlertDialog("Revision cannot be blank");
                return;
            }

            foreach (var drawing in Settings.DrawingData)
            {
                if (drawing.ToBeUpdated)
                {
                    string filePath = drawing.FolderPath + "\\" + drawing.DrawingName + ".dwg";

                    //Open drawings
                    DM.OPENDRAWING(filePath);

                    //set drawing active
                    DM.ACTIVATEDRAWING(filePath);

                    //update Attribute
                    var RRL = new RemoveRevLine();
                    RRL.REMOVEREVLINE(Settings, drawing, revToDel);

                    //save
                    DM.SAVEDRAWING(filePath);

                    //close
                    DM.CLOSEDRAWING(filePath);
                }
            }
        }