public static void updateSurfaces() { try { Grading_Palette.gPalette.pGrading.BlockXRefName = String.Empty; Grading_Palette.gPalette.pGrading.Initialize_Form(); myForms.GradeFloor pGF = Grading_Palette.gPalette.pGradeFloor; pGF.lstBox1.Items.Clear(); List <string> surfaces = Surf.getSurfaces(); if (surfaces != null) { for (int i = 0; i < surfaces.Count; i++) { pGF.lstBox1.Items.Add(surfaces[i].ToUpper()); if (surfaces[i].ToUpper() == "EXIST") { pGF.lstBox1.SelectedIndex = i; } } } } catch (System.Exception ex) { BaseObjs.writeDebug(ex.Message + " Grading_Utility.cs: line: 543"); } }
Initialize_Form() { optSetElevByDiff.IsChecked = false; int index = 0; List <string> surfaces = Surf.getSurfaces(); lstBox1.Items.Clear(); if (surfaces != null) { for (int i = 0; i < surfaces.Count; i++) { string surface = surfaces[i]; if (surface.Length < 15) { lstBox1.Items.Add(surface); if (surface.ToUpper() == "EXIST") { index = i; } } } lstBox1.SelectedIndex = index; } cmbSlope.Items.Clear(); cmbSlope.Items.Add(0.000); cmbSlope.Items.Add(0.001); cmbSlope.Items.Add(0.002); cmbSlope.Items.Add(0.003); cmbSlope.Items.Add(0.004); cmbSlope.Items.Add(0.005); cmbSlope.SelectedValue = "0.000"; cmbSlope.SelectedIndex = 0; }
public frmMain() { InitializeComponent(); cbxB2.Checked = true; cbxB1.Checked = true; tbxB2Width.Text = Convert.ToString(2); tbxB1Width.Text = Convert.ToString(2); tbxB2Slope.Text = Convert.ToString(.02); tbxB1Slope.Text = Convert.ToString(.02); tbxSlope.Text = Convert.ToString(2); tbxInterval.Text = Convert.ToString(10); try { List <string> Surfaces = Surf.getSurfaces(); foreach (string Name in Surfaces) { lbxSurfaceDES.Items.Add(Name); lbxSurfaceTAR.Items.Add(Name); } } catch (SystemException) { } }
private void wSurfaces_Activated(object sender, EventArgs e) { List <string> surfaces = Surf.getSurfaces(); foreach (string surface in surfaces) { this.lbxBase.Items.Add(surface); this.lbxComp.Items.Add(surface); } }
public frmSurfaces() { InitializeComponent(); List <string> surfaces = Surf.getSurfaces(); foreach (string surface in surfaces) { this.lboxBASE.Items.Add(surface); this.lboxCOMP.Items.Add(surface); } }
makeVolSurface(string strNameBASE, string strNameCOMP, bool boolShowMessage) { string nameSurface = string.Format("VOL_{0}_{1}", strNameBASE, strNameCOMP); List <string> nameSurfaces = Surf.getSurfaces(); for (int i = 0; i < nameSurfaces.Count; i++) { if (nameSurfaces[i] == nameSurface) { Surf.removeSurface(nameSurfaces[i]); } } TinSurface objSurfaceBASE = Surf.getTinSurface(strNameBASE); TinSurface objSurfaceCOMP = Surf.getTinSurface(strNameCOMP); int lngVolCut = 0; int lngVolFill = 0; ObjectId idSurfFill = TinVolumeSurface.Create(nameSurface, objSurfaceBASE.ObjectId, objSurfaceCOMP.ObjectId); SelectionSet objSSetLim = EW_Utility1.buildSSetGradingLim(); ObjectId[] ids = objSSetLim.GetObjectIds(); TinVolumeSurface objSurfaceFILL = null; if (ids != null && ids.Length > 0) { ObjectId idPoly = ids[0]; idPoly.checkIfClosed(); ObjectId idPoly3d = Conv.poly_Poly3d(idPoly, 0, "0"); ObjectId[] idBndrys = { idPoly3d }; objSurfaceFILL = (TinVolumeSurface)idSurfFill.getEnt(); objSurfaceFILL.BoundariesDefinition.AddBoundaries(new ObjectIdCollection(idBndrys), 1.0, Autodesk.Civil.SurfaceBoundaryType.Outer, true); objSurfaceFILL.Rebuild(); idPoly3d.delete(); } else { MessageBox.Show("GRADING LIMIT not found - OUTER BOUNDARY not added."); } lngVolCut = (int)objSurfaceFILL.GetVolumeProperties().UnadjustedCutVolume / 27; lngVolFill = (int)objSurfaceFILL.GetVolumeProperties().UnadjustedFillVolume / 27; if (boolShowMessage == true) { string mess = string.Format("Cut: {0} CY Fill: {1} CY", lngVolCut, lngVolFill); MessageBox.Show(mess); } EW_Main.viewResults("VOL", false); }
updateSurfaceTarList() { try { cbxSurfaceDes.Items.Clear(); cbxSurfaceTar.Items.Clear(); List <string> Surfaces = Surf.getSurfaces(); foreach (string Name in Surfaces) { cbxSurfaceDes.Items.Add(Name); cbxSurfaceTar.Items.Add(Name); } } catch (SystemException) { } }
updateVolSurface(string strNameBASE, string strNameCOMP) { string nameSurface = string.Format("VOL_{0}_{1}", strNameBASE, strNameCOMP); List <string> nameSurfaces = Surf.getSurfaces(); for (int i = 0; i < nameSurfaces.Count; i++) { if (nameSurfaces[i] == nameSurface) { Surf.removeSurface(nameSurfaces[i]); } } TinSurface objSurfaceBASE = Surf.getTinSurface(strNameBASE); TinSurface objSurfaceCOMP = Surf.getTinSurface(strNameCOMP); TinVolumeSurface.Create(nameSurface, objSurfaceBASE.ObjectId, objSurfaceCOMP.ObjectId); }