public ExternalDBApplicationResult OnShutdown( ControlledApplication a) { JtSettings.Save(); JtLogger.Done(); return(ExternalDBApplicationResult.Succeeded); }
public ExternalDBApplicationResult OnStartup( ControlledApplication a) { string path = Assembly.GetExecutingAssembly().Location; JtLogger.Init(Path.ChangeExtension(path, "log")); JtSettings.Init(Path.ChangeExtension(path, "json")); a.ApplicationInitialized += OnApplicationInitialized; return(ExternalDBApplicationResult.Succeeded); }
public ExternalDBApplicationResult OnStartup( ControlledApplication a) { string path = Assembly.GetExecutingAssembly().Location; JtLogger.Init(Path.ChangeExtension(path, "log")); JtSettings.Init(Path.ChangeExtension(path, "json")); #if FORGE_DA4R_TEST_LOCALLY a.ApplicationInitialized += OnApplicationInitialized; #else // if not FORGE_DA4R_TEST_LOCALLY DesignAutomationBridge.DesignAutomationReadyEvent += OnDesignAutomationReadyEvent; #endif // FORGE_DA4R_TEST_LOCALLY return(ExternalDBApplicationResult.Succeeded); }
/// <summary> /// Export all linked-in IFC document rooms and zones /// </summary> int ExportLinkedInIfcDocs(Application app) { if (0 == app.Documents.Size) { string path = JtSettings.Instance .IfcRvtInputFilePath; Document doc = app.OpenDocumentFile(path); if (doc == null) { string s = string.Format( "Could not open document {0}.", path); JtLogger.Log(s); throw new InvalidOperationException(s); } } return(RoomZoneExporter.ExportAll(app)); }