Beispiel #1
0
        /// <summary>
        /// The action taken on application initialization.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="eventArgs">The event args.</param>
        private void OnApplicationInitialized(object sender, EventArgs eventArgs)
        {
            SingleServerService service = ExternalServiceRegistry.GetService(ExternalServices.BuiltInExternalServices.IFCImporterService) as SingleServerService;

            if (service != null)
            {
                Importer importer = new Importer();
                service.AddServer(importer);
                service.SetActiveServer(importer.GetServerId());
            }
            else
            {
                throw new InvalidOperationException("Failed to get IFC importer service.");
            }
        }
Beispiel #2
0
        private void ApplicationInitialized(object sender, ApplicationInitializedEventArgs e)
        {
            // Register the IFC Entity selection server
            SingleServerService entUIService = ExternalServiceRegistry.GetService(ExternalServices.BuiltInExternalServices.IFCEntityTreeUIService) as SingleServerService;

            if (entUIService != null)
            {
                try
                {
                    IFCEntityTree.BrowseIFCEntityServer browseIFCEntityServer = new IFCEntityTree.BrowseIFCEntityServer();
                    entUIService.AddServer(browseIFCEntityServer);
                    entUIService.SetActiveServer(browseIFCEntityServer.GetServerId());
                }
                catch {}
            }
        }