public override void OnActivate() { // Close all local contexts to draw on the Neutral Point _context.CloseAllContexts(false); Document.Undo(); var activeSketch = Document.Root.Get <DocumentContextInterpreter>().ActiveSketch; if (activeSketch == -1) { NodeUtils.RebuildDocumentFaces(Document); } var solidsNodes = NodeUtils.GetSolidsNodes(Document); foreach (var node in solidsNodes) { var nb = new NodeBuilder(node); nb.ExecuteFunction(); } var visibleNodes = NodeUtils.GetVisibleSketchNodes(Document); foreach (var node in visibleNodes) { var nb = new NodeBuilder(node); nb.Visibility = ObjectVisibility.ToBeDisplayed; nb.ExecuteFunction(); } UpdateView(); RebuildTreeView(); BackToNeutralModifier(); }
protected override void OnNotification(string name, DataPackage dataPackage) { switch (name) { case NotificationNames.Suspend: if (_lockedPlane) { return; } if (_facePickerSuspended) { return; } if (!_facePickerSuspended) { _context.CloseAllContexts(true); } _facePickerSuspended = true; Log.Info("FacePickerPlane - suspended"); break; case NotificationNames.LockPlane: Send(NotificationNames.Suspend); Face = dataPackage.Get <TopoDSFace>(); _lockedPlane = true; break; case NotificationNames.Resume: if (_lockedPlane) { return; } if (!_facePickerSuspended) { return; } _facePickerSuspended = false; Face = null; Log.Info("FacePickerPlane - resumed"); break; case NotificationNames.Cleanup: break; default: NaroMessage.Show(@"Object name: " + name + @" is not handled in input notification"); break; } }