예제 #1
0
 public WellKh(Borehole SelectedWell, Property SelectedPermeability, DictionaryProperty SelectedZoneIndex)
 {
     this.permeability = SelectedPermeability;
     this.well = SelectedWell;
     this.ZoneIndex = SelectedZoneIndex;
     this.root = ColorTableRoot.Get(PetrelProject.PrimaryProject);
     this.ListOfNamesOfIntersectedZones = new List<string>();
     this.KhWellTesting = -1;
 }
예제 #2
0
 public WellKh(Borehole SelectedWell, Property SelectedPermeability, double SelectedTop, double SelectedBottom )
 {
     this.permeability = SelectedPermeability;
     this.well = SelectedWell;
     this.top = SelectedTop;
     this.bottom = SelectedBottom;
     this.ZoneIndex = null;
     this.root = null;
     this.ListOfNamesOfIntersectedZones = null;
     this.KhWellTesting = -1;
 }
            public override void ExecuteSimple()
            {
                // extract data from arguments
                var templateName        = arguments.Name;
                var templatePrecision   = arguments.Precision;
                var templateDisplayUnit = arguments.DisplayUnit;
                var templateLabel       = arguments.Label;
                //
                // find an appropriate measurment
                var timeMeasurement = PetrelUnitSystem.GetUnitMeasurement("Time");
                //
                // find an appropriate template collection
                var timeTwoWayTemplate            = PetrelProject.WellKnownTemplates.GeometricalGroup.TimeTwoWay;
                var geometricalTemplateCollection = timeTwoWayTemplate.TemplateCollection;
                //
                // find an appropriate color table
                var colorTableRoot = ColorTableRoot.Get(PetrelProject.PrimaryProject);
                var generalContinuousColorTable = colorTableRoot.WellKnownColorTables.Other.GeneralContinuous;
                //
                // find appropriate unit
                var unitServiceSettingsService = CoreSystem.GetService <IUnitServiceSettings>();
                var templateUnit = unitServiceSettingsService?.CurrentCatalog.GetUnit(templateDisplayUnit);

                //
                using (var transaction = DataManager.NewTransaction())
                {
                    transaction.Lock(geometricalTemplateCollection);
                    //
                    var uniqueTemplateName = PetrelSystem.TemplateService.GetUniqueName(templateName);
                    var canCreateTemplate  = geometricalTemplateCollection.CanCreateTemplate(timeTwoWayTemplate);
                    if (canCreateTemplate)
                    {
                        var newTemplate = geometricalTemplateCollection.CreateTemplate(uniqueTemplateName, generalContinuousColorTable, timeMeasurement, templateUnit);
                        if (newTemplate != null)
                        {
                            PetrelLogger.InfoOutputWindow("Create a new template with name " + uniqueTemplateName);
                        }
                    }
                    //
                    transaction.Commit();
                }
            }
예제 #4
0
 public WellKh()
 {
     this.ListOfNamesOfIntersectedZones = new List<string>();
     this.root = ColorTableRoot.Get(PetrelProject.PrimaryProject);
     this.KhWellTesting = -1;
 }