コード例 #1
0
        private void RemoveDwgImports(int id)
        {
            try
            {
                this.myRequest = new KbBimstoreRequest();

                int importInstNum = 0;
                IEnumerable <ImportInstance> unlinkedImportInstances = new FilteredElementCollector(doc).OfClass(typeof(ImportInstance)).Cast <ImportInstance>().Where(i => i.IsLinked == false);
                foreach (ImportInstance curImportInstance in unlinkedImportInstances)
                {
                    this.importInstancesCategoryIds.Add(curImportInstance.Category.Id);
                    importInstNum++;
                }

                if (importInstNum > 0)
                {
                    doc.Delete(this.importInstancesCategoryIds);

                    TaskDialog.Show("Info", "We have removed " + importInstNum.ToString() + " unlinked .dwg imports");
                }
                else
                {
                    TaskDialog.Show("Info", "There is no unlinked .dwg import");
                }
            }
            catch (Exception ex)
            {
                TaskDialog.Show("Exception", ex.Message);
            }
        }
コード例 #2
0
        public SetDoorOffsetHandler(List <Tuple <Autodesk.Revit.DB.FamilyInstance, Autodesk.Revit.DB.Wall> > selectedDoorsAndWalls, double selectedOffset)
        {
            this.selectedOffset        = selectedOffset;
            this.selectedDoorsAndWalls = selectedDoorsAndWalls;

            this.myRequest = new KbBimstoreRequest();
        }
コード例 #3
0
        public PageAlignmentToolRequestHandler(XYZ norXYZ, ElementId deltaViewportId, List <ElementId> viewportsIds)
        {
            this.norXYZ          = norXYZ;
            this.deltaViewportId = deltaViewportId;
            this.viewportsIds    = viewportsIds;


            this.myRequest = new KbBimstoreRequest();
        }
コード例 #4
0
 public CreateNewProjectRequestHandler(CreateNewProjectRequestData requestData)
 {
     this.requestData = requestData;
     this.myRequest   = new KbBimstoreRequest();
 }
コード例 #5
0
 public RenumberViewportsHandler(List <Tuple <ElementId, int> > viewportIdsAndNumbers)
 {
     this.viewportIdsAndNumbers = viewportIdsAndNumbers;
     this.myRequest             = new KbBimstoreRequest();
 }
コード例 #6
0
 public RenumberByDoorsHandler(List <Tuple <Parameter, int> > parametersNewValues)
 {
     this.parametersNewValues = parametersNewValues;
     this.myRequest           = new KbBimstoreRequest();
 }
コード例 #7
0
 public AutomaticDoorRenumberToFromHandler(List <FamilyInstance> selectedDoors, int selectedDirection)
 {
     this.selectedDirection = selectedDirection;
     this.selectedDoors     = selectedDoors;
     this.myRequest         = new KbBimstoreRequest();
 }
コード例 #8
0
 public DesignOptionsRequestHandlerInit()
 {
     this.myRequest = new KbBimstoreRequest();
 }
コード例 #9
0
 public AutomaticDoorRenumberHandler(Parameter selectedRoomNumberParameter, Parameter selectedDoorNumberParameter)
 {
     this.selectedRoomNumberParameter = selectedRoomNumberParameter;
     this.selectedDoorNumberParameter = selectedDoorNumberParameter;
     this.myRequest = new KbBimstoreRequest();
 }
コード例 #10
0
 public DesignOptionsRequestHandler(DesignOptionsRequestData requestData)
 {
     this.requestData = requestData;
     this.myRequest   = new KbBimstoreRequest();
 }