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);
            }
        }
        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();
        }
Beispiel #3
0
        public PageAlignmentToolRequestHandler(XYZ norXYZ, ElementId deltaViewportId, List <ElementId> viewportsIds)
        {
            this.norXYZ          = norXYZ;
            this.deltaViewportId = deltaViewportId;
            this.viewportsIds    = viewportsIds;


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