Example #1
0
 public ExternalDBApplicationResult OnShutdown(
     ControlledApplication a)
 {
     JtSettings.Save();
     JtLogger.Done();
     return(ExternalDBApplicationResult.Succeeded);
 }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        /// <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));
        }