public static WellLogVersion CreateWellLogVersionFromWellLog(WellLog wellLog) { WellLogVersion wellLogVersion = WellLogVersion.NullObject; // Borehole borehole = wellLog.Borehole; // Template wellLogTemplate = wellLog.WellLogVersion.Template; // WellRoot wellRoot = WellRoot.Get(PetrelProject.PrimaryProject); // var logVersionCollection = wellRoot.LogVersionCollection; // if (!borehole.Logs.CanCreateWellLog(wellLog.WellLogVersion)) { using (var transaction = DataManager.NewTransaction()) { transaction.Lock(logVersionCollection); // wellLogVersion = logVersionCollection.CreateWellLogVersion("Copied " + wellLog.WellLogVersion.Name, wellLogTemplate); // transaction.Commit(); } } // return(wellLogVersion); }
private WellLog CreateWellLog(WellLog originalWellLog, double multiplier, WellLogVersion wellLogVersion) { // WellLog wellLog = WellLog.NullObject; // var borehole = originalWellLog.Borehole; // using (var transaction = DataManager.NewTransaction()) { transaction.Lock(borehole); // wellLog = borehole.Logs.CreateWellLog(wellLogVersion); // var wellLogSamples = new List <WellLogSample>(); foreach (var wellLogSample in originalWellLog.Samples) { wellLogSamples.Add(new WellLogSample(wellLogSample.MD, (float)(multiplier * wellLogSample.Value))); } // wellLog.Samples = wellLogSamples.ToArray(); // transaction.Commit(); } // return(wellLog); }