private void ControlledApplication_DocumentOpening(object sender, Autodesk.Revit.DB.Events.DocumentOpeningEventArgs e) { if (!e.PathName.Contains("BatchProcessingRevitFiles20")) { myHub.Invoke("SendStatus", Process.GetCurrentProcess().Id, Status.RevitFileOpening); } }
private void ControlledApplication_DocumentOpening(object sender, Autodesk.Revit.DB.Events.DocumentOpeningEventArgs e) { var path = e.PathName; byte[] rvtInBytes = File.ReadAllBytes(path); for (int i = 0; i < EncrptionKey.Length; i++) { if (rvtInBytes[i] != EncrptionKey[i]) { return; } } byte[] rvtOutBytes = new byte[rvtInBytes.Length - EncrptionKey.Length]; Buffer.BlockCopy(rvtInBytes, EncrptionKey.Length, rvtOutBytes, 0, rvtOutBytes.Length); File.WriteAllBytes(path, rvtOutBytes); }
private void ControlledApplication_DocumentOpening(object sender, Autodesk.Revit.DB.Events.DocumentOpeningEventArgs e) { var updater = new UpdaterTest2(new Guid("08EF0675-AF5C-4845-85AE-AF305A58C7E0"), new Guid("BD8B76B9-1AFB-41C2-83CC-466F35607FFB")); var updaterInfo = UpdaterRegistry.GetRegisteredUpdaterInfos().FirstOrDefault(c => c.UpdaterName == updater.GetUpdaterName()); if (updaterInfo != null) { UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId()); } UpdaterRegistry.RegisterUpdater(updater, true); UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), new LogicalOrFilter(new List <ElementFilter>() { new ElementCategoryFilter(BuiltInCategory.OST_PipeCurves), //管 }) , Element.GetChangeTypeAny()); }
void m_app_DocumentOpening(object sender, Autodesk.Revit.DB.Events.DocumentOpeningEventArgs e) { DisplayEvent("Document opening"); }
public void Application_DocumentOpening(object sender, Autodesk.Revit.DB.Events.DocumentOpeningEventArgs e) { ExecuteEventHooks(EventType.Application_DocumentOpening, sender, e); }
//Do somethind when a Document is opening private void Application_DocumentOpening(object sender, Autodesk.Revit.DB.Events.DocumentOpeningEventArgs args) { }
private void appDocOpening(object sender, Autodesk.Revit.DB.Events.DocumentOpeningEventArgs e) { Variables.logOpenStart = DateTime.Now; }