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

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

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


            MainForm.ClearChangedItems();
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 6
0
 private bool ConnectToDB()
 {
     return(FireBaseConnection.Connect("models", _doc.Title));
 }
Ejemplo n.º 7
0
 private void SetRealTimeConnection()
 {
     FireBaseConnection.ReceiveChangesFromDB();
 }
Ejemplo n.º 8
0
 private bool ConnectToDB()
 {
     return(FireBaseConnection.Connect("models", projectName));
 }