private void SendModel_Click(object sender, RoutedEventArgs e) { string ro = RhinoManagement.ConvertModelToString(); if (ro != null) { FireBaseConnection.SendModelToDB(ro, "models", projectName); } }
private void Send_Button_Click(object sender, RoutedEventArgs e) { string ro = RhinoManagement.ConvertChangesToString(); if (ro != null) { FireBaseConnection.SendChangesToDB(ro, null); } MainForm.ClearChangedItems(); }
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); }
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); }
/// <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; }
private bool ConnectToDB() { return(FireBaseConnection.Connect("models", _doc.Title)); }
private void SetRealTimeConnection() { FireBaseConnection.ReceiveChangesFromDB(); }
private bool ConnectToDB() { return(FireBaseConnection.Connect("models", projectName)); }