/// <summary> /// Add and register the sever on Revit startup. /// </summary> public ExternalDBApplicationResult OnStartup(ControlledApplication application) { ExternalService plumbingFixtureService = ExternalServiceRegistry.GetService(ExternalServices.BuiltInExternalServices.PipePlumbingFixtureFlowService); Pipe.PlumbingFixtureFlowServer flowServer = new Pipe.PlumbingFixtureFlowServer(); if (plumbingFixtureService != null) { plumbingFixtureService.AddServer(flowServer); } ExternalService pipePressureDropService = ExternalServiceRegistry.GetService(ExternalServices.BuiltInExternalServices.PipePressureDropService); Pipe.PipePressureDropServer pressureDropServer = new Pipe.PipePressureDropServer(); if (pipePressureDropService != null) { pipePressureDropService.AddServer(pressureDropServer); } ExternalService ductPressureDropService = ExternalServiceRegistry.GetService(ExternalServices.BuiltInExternalServices.DuctPressureDropService); Duct.DuctPressureDropServer ductPressureDropServer = new Duct.DuctPressureDropServer(); if (ductPressureDropService != null) { ductPressureDropService.AddServer(ductPressureDropServer); } return(ExternalDBApplicationResult.Succeeded); }
/// <summary> /// Add and register the sever on Revit startup. /// </summary> public ExternalDBApplicationResult OnStartup(ControlledApplication application) { ExternalService plumbingFixtureService = ExternalServiceRegistry.GetService(ExternalServices.BuiltInExternalServices.PipePlumbingFixtureFlowService); Pipe.PlumbingFixtureFlowServer flowServer = new Pipe.PlumbingFixtureFlowServer(); if (plumbingFixtureService != null) plumbingFixtureService.AddServer(flowServer); ExternalService pipePressureDropService = ExternalServiceRegistry.GetService(ExternalServices.BuiltInExternalServices.PipePressureDropService); Pipe.PipePressureDropServer pressureDropServer = new Pipe.PipePressureDropServer(); if (pipePressureDropService != null) pipePressureDropService.AddServer(pressureDropServer); ExternalService ductPressureDropService = ExternalServiceRegistry.GetService(ExternalServices.BuiltInExternalServices.DuctPressureDropService); Duct.DuctPressureDropServer ductPressureDropServer = new Duct.DuctPressureDropServer(); if (ductPressureDropService != null) ductPressureDropService.AddServer(ductPressureDropServer); return ExternalDBApplicationResult.Succeeded; }