testVolTable(int numSteps = 0, double incre = 0, short clrStart = 100) { TinVolumeSurface objSurfaceVOL = Surf.getTinVolumeSurface("wse"); double minElev = objSurfaceVOL.GetGeneralProperties().MinimumElevation; double maxElev = objSurfaceVOL.GetGeneralProperties().MaximumElevation; if (incre == 0) { incre = (maxElev - minElev) / numSteps; } if (numSteps == 0) { numSteps = (int)((maxElev - minElev) / incre); } SurfaceAnalysisElevationData[] objSurfaceAnalysisElevation = new SurfaceAnalysisElevationData[numSteps]; for (int i = 0; i < numSteps; i++) { Color clr = Color.FromColorIndex(ColorMethod.ByLayer, (short)(clrStart + (i * 2))); objSurfaceAnalysisElevation[i] = new SurfaceAnalysisElevationData(minElev + (incre * i), minElev + (incre * (i + 1)), clr); } objSurfaceVOL.Analysis.SetElevationData(objSurfaceAnalysisElevation); }
initForm() { TinVolumeSurface objSurfaceTIN = Surf.getTinVolumeSurface("VOL_EXIST_BOT"); dblVOL_EXIST_BOT_CUT = objSurfaceTIN.GetVolumeProperties().UnadjustedCutVolume / 27; dblVOL_EXIST_BOT_FILL = objSurfaceTIN.GetVolumeProperties().UnadjustedFillVolume / 27; objSurfaceTIN = Surf.getTinVolumeSurface("VOL_BOT_SG"); dblVOL_BOT_SG_CUT = objSurfaceTIN.GetVolumeProperties().UnadjustedCutVolume / 27; dblVOL_BOT_SG_FILL = objSurfaceTIN.GetVolumeProperties().UnadjustedFillVolume / 27; TinSurface objSurfaceCPNT = Surf.getTinSurface("CPNT-ON"); TinSurface objSurfaceSG = Surf.getTinSurface("SG"); dblSG_MEAN_ELEV = System.Math.Round(objSurfaceSG.GetGeneralProperties().MeanElevation, 2); dblVOL_CUT_TOT = dblVOL_EXIST_BOT_CUT + dblVOL_BOT_SG_CUT; dblVOL_FILL_TOT = dblVOL_EXIST_BOT_FILL + dblVOL_BOT_SG_FILL; dblVOL_CUT_SHRINK = dblVOL_CUT_TOT * dblSHRINKAGE_FACTOR * -1; dblVOL_CUT_NET = dblVOL_CUT_TOT + dblVOL_CUT_ADJ_NET + dblVOL_CUT_SHRINK; dblVOL_FILL_NET = dblVOL_FILL_TOT + dblVOL_FILL_ADJ_NET; dblVOL_NET = dblVOL_CUT_NET - dblVOL_FILL_NET; dblSITE_ADJUST = dblVOL_NET * 27 / dblAREA_SITE; strDATE = DateTime.Today.ToShortDateString(); strUSER = System.Environment.UserName; EW_Data varDataCurrent = new EW_Data(); varDataCurrent.ITERATION = "C"; varDataCurrent.DATE = strDATE; varDataCurrent.USER = strUSER; varDataCurrent.AREA_SITE = dblAREA_SITE; varDataCurrent.SG_MEAN_ELEV = dblSG_MEAN_ELEV; varDataCurrent.VOL_CUT_TOT = dblVOL_CUT_TOT; varDataCurrent.VOL_FILL_ADJ_NET = dblVOL_CUT_ADJ_NET; varDataCurrent.VOL_CUT_SHRINK = dblVOL_CUT_SHRINK; varDataCurrent.VOL_CUT_NET = dblVOL_CUT_NET; varDataCurrent.VOL_FILL_TOT = dblVOL_FILL_TOT; varDataCurrent.VOL_FILL_ADJ_NET = dblVOL_FILL_ADJ_NET; varDataCurrent.VOL_FILL_NET = dblVOL_FILL_NET; varDataCurrent.VOL_NET = dblVOL_NET; varDataCurrent.SITE_ADJUST = dblSITE_ADJUST; //ObjectId idDictEW = Dict.getNamedDictionary("EARTHWORK", out exists); //idDict.delete(); !!!!!!!!!!!!!!!!!!!!!!!****************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ObjectId idDictEW = Dict.getNamedDictionary("EARTHWORK", out exists); if (!exists) { this.Title = "NEW EARTHWORK - COOL!!"; dblSG_MEAN_ELEV0 = dblSG_MEAN_ELEV; this.AdjustSurfaceSG.Text = string.Format("{0:#0.00}", dblSG_MEAN_ELEV - dblSG_MEAN_ELEV0); ewData.Add(varDataCurrent); this.DG1.DataContext = ewData; } else { ewData = getDictData(); if (ewData.Count != 0) { dblSG_MEAN_ELEV0 = ewData[0].SG_MEAN_ELEV; if (dblSG_MEAN_ELEV0 == 0) { dblSG_MEAN_ELEV0 = dblSG_MEAN_ELEV; } this.AdjustSurfaceSG.Text = string.Format("{0:#0.00}", dblSG_MEAN_ELEV - dblSG_MEAN_ELEV0); } else { dblSG_MEAN_ELEV0 = dblSG_MEAN_ELEV; } this.DG1.DataContext = ewData; } }