Example #1
0
        private void SendModel_Click(object sender, RoutedEventArgs e)
        {
            string ro = RhinoManagement.ConvertModelToString();

            if (ro != null)
            {
                FireBaseConnection.SendModelToDB(ro, "models", projectName);
            }
        }
Example #2
0
        private void Send_Button_Click(object sender, RoutedEventArgs e)
        {
            string ro = RhinoManagement.ConvertChangesToString();

            if (ro != null)
            {
                FireBaseConnection.SendChangesToDB(ro, null);
            }


            MainForm.ClearChangedItems();
        }
Example #3
0
        public void Execute(UIApplication app)
        {
            var _doc = app.ActiveUIDocument.Document;

            RevitManagement.SetCurrentDocument(_doc);
            RevitManagement.SetCurrentUIDocument(app.ActiveUIDocument);
            var changes = RevitManagement.ProcessLocalChanges();


            RevitManagement.changedElements = new List <ElementId>();
            MainForm.ClearChangedItems();

            if (changes == null)
            {
                return;
            }
            FireBaseConnection.SendChangesToDB(changes, null);
        }
Example #4
0
        public void Execute(UIApplication app)
        {
            var _doc = app.ActiveUIDocument.Document;

            RevitManagement.SetCurrentDocument(_doc);
            RevitManagement.SetCurrentUIDocument(app.ActiveUIDocument);

            if (_doc.ActiveView.ViewType != ViewType.ThreeD)
            {
                var td = new TaskDialog("Wrong view type");
                td.MainInstruction = "Select a 3D View to start the app";
                td.Show();
                return;
            }

            RevitManagement.SetView3D(_doc.ActiveView as View3D);
            var CurrentRootObject = RevitManagement.ProcessAllModel();

            FireBaseConnection.SendModelToDB(CurrentRootObject, "models", _doc.Title);
        }
Example #5
0
        /// <summary>
        /// Check if the suffix is a number or not
        /// </summary>
        /// <param name="cmddata_p"></param>
        public MainForm(ExternalCommandData cmddata_p)
        {
            this.DataContext   = this;
            this.p_commanddata = cmddata_p;

            InitializeComponent();

            _changedElements = new ObservableCollection <ElementId>();
            BindingOperations.EnableCollectionSynchronization(_changedElements, _changedElementsLock);
            _receivedElements = new ObservableCollection <ElementId>();
            BindingOperations.EnableCollectionSynchronization(_receivedElements, _receviedElementslock);

            cleanVariables();

            this._doc = cmddata_p.Application.ActiveUIDocument.Document;
            bool connected = ConnectToDB();

            FireBaseConnection.ReceiveChangesFromDB();
            this.Closed += ClosingWindow;
            this.SendChangesList.ItemsSource    = _changedElements;
            this.ReceiveChangesList.ItemsSource = _receivedElements;
        }
Example #6
0
 private bool ConnectToDB()
 {
     return(FireBaseConnection.Connect("models", _doc.Title));
 }
Example #7
0
 private void SetRealTimeConnection()
 {
     FireBaseConnection.ReceiveChangesFromDB();
 }
Example #8
0
 private bool ConnectToDB()
 {
     return(FireBaseConnection.Connect("models", projectName));
 }