private void InitMaterialLayersAandImages() { foreach (MaterialData material in Materials) { vdColor color = new vdColor { Red = material.Color.Red, Green = material.Color.Green, Blue = material.Color.Blue, AlphaBlending = (byte)(255.0 * (1 - material.Transparency / 100.0)) }; vdLayer layer = new vdLayer(vDraw.ActiveDocument, material.Name, color); vDraw.ActiveDocument.Layers.AddItem(layer); if (string.IsNullOrEmpty(material.GetValidMapFile())) { continue; } var fileName = Path.GetFileNameWithoutExtension(ExportSetting.SystemSetting.ExportFilePath); var folderName = Path.GetDirectoryName(ExportSetting.SystemSetting.ExportFilePath); var imageFilePath = folderName + "\\" + fileName + "_texture\\" + material.GetValidMapFile(); AddImage(imageFilePath); } }
public static ulong CreateLayer(vdDocument activeDocument, string layerName, int argbPenColor, string lineType) { try { vdLayer layer = activeDocument.Layers.FindName(layerName); if (null != layer) { activeDocument.Layers.RemoveItem(layer); } vdLayer newlayer = new VectorDraw.Professional.vdPrimaries.vdLayer(); newlayer.Name = layerName; newlayer.PenColor.SystemColor = Color.FromArgb(argbPenColor); if (!string.IsNullOrEmpty(lineType)) { newlayer.LineType = activeDocument.LineTypes.FindName(lineType); } //We set the document where the polyline is going to be added.This is important for the vdPolyline in order to obtain initial properties with setDocumentDefaults. newlayer.SetUnRegisterDocument(activeDocument); newlayer.setDocumentDefaults(); activeDocument.Layers.AddItem(newlayer); return(newlayer.Handle.Value); } catch { return(0); } }
public void DrawSupportFixed(vdDocument doc, gPoint pt) { supportFixedLay.Name = "SupportFixed"; if (doc.Layers.FindName("SupportFixed") == null) { supportFixedLay = new vdLayer(); supportFixedLay.Name = "SupportFixed"; supportFixedLay.SetUnRegisterDocument(doc); supportFixedLay.setDocumentDefaults(); doc.Layers.AddItem(supportFixedLay); } else { supportFixedLay = doc.Layers.FindName("SupportFixed"); } ASTRASupportFixed asFix = new ASTRASupportFixed(); asFix.SetUnRegisterDocument(doc); asFix.setDocumentDefaults(); asFix.Origin = pt; asFix.Radius = 0.1d; asFix.Layer = supportFixedLay; doc.ActiveLayOut.Entities.AddItem(asFix); }
private void AddLevelData() { if (Levels == null) { return; } vdLayer layer = vDraw.ActiveDocument.Layers.FindName(_gGridLayerName); if (layer == null) { layer = new vdLayer(vDraw.ActiveDocument, _gGridLayerName); vDraw.ActiveDocument.Layers.Add(layer); } foreach (var lv in Levels) { vdXProperty vdx1 = new vdXProperty { Name = lv.Name, PropValue = (Tools.Ft2MmScale * lv.Height).ToString() }; layer.XProperties.AddItem(vdx1); } }
public void DrawJointsText(vdDocument doc, double txtSize) { nodalLay = doc.Layers.FindName("Nodes"); if (nodalLay == null) { nodalLay = new vdLayer(); nodalLay.Name = "Nodes"; nodalLay.SetUnRegisterDocument(doc); nodalLay.setDocumentDefaults(); doc.Layers.AddItem(nodalLay); } nodalLay.PenColor = new vdColor(Color.Magenta); //nodalLay.PenColor = new vdColor(Color.Green); nodalLay.Update(); for (int i = 0; i < list.Count; i++) { //vdMText vTxt = new vdMText(); //vTxt.SetUnRegisterDocument(doc); //vTxt.setDocumentDefaults(); //vTxt.InsertionPoint = list[i].Point; //vTxt.Height = txtSize; //vTxt.HorJustify = VdConstHorJust.VdTextHorCenter; //vTxt.VerJustify = VdConstVerJust.VdTextVerCen; //vTxt.TextString = list[i].NodeNo.ToString(); //vTxt.Layer = nodalLay; //doc.ActiveLayOut.Entities.AddItem(vTxt); vdText vTxt = new vdText(); vTxt.SetUnRegisterDocument(doc); vTxt.setDocumentDefaults(); vTxt.InsertionPoint = list[i].Point; vTxt.Height = txtSize; //vTxt.HorJustify = VdConstHorJust.VdTextHorCenter; //vTxt.VerJustify = VdConstVerJust.VdTextVerCen; vTxt.TextString = list[i].NodeNo.ToString(); vTxt.ToolTip = string.Format("Joint No : {0} [X:{1:f4}, Y:{2:f4}, Z:{3:f4}", list[i].NodeNo, list[i].Point.x, list[i].Point.y, list[i].Point.z); vTxt.Layer = nodalLay; doc.ActiveLayOut.Entities.AddItem(vTxt); //vdCircle vcir = new vdCircle(); //vcir.SetUnRegisterDocument(doc); //vcir.setDocumentDefaults(); //vcir.Center = list[i].Point; //vcir.Radius = txtSize; //vcir.Layer = nodalLay; //doc.ActiveLayOut.Entities.AddItem(vcir); } doc.Update(); doc.Redraw(true); }
private void SetEntityLayer(vdFigure vdf, string layerName) { vdLayer layer = vDraw.ActiveDocument.Layers.FindName(layerName); if (layer == null) { layer = new vdLayer(vDraw.ActiveDocument, layerName); vDraw.ActiveDocument.Layers.Add(layer); } vdf.Layer = layer; }
public void DrawPipeDetails(vdDocument doc) { pipeDetailsLay = new vdLayer(); pipeDetailsLay.Name = "PipeData"; pipeDetailsLay.SetUnRegisterDocument(doc); pipeDetailsLay.setDocumentDefaults(); doc.Layers.AddItem(pipeDetailsLay); pipeDetailsLay.PenColor = new vdColor(Color.Magenta); foreach (DisNetPipeDetails pdtls in list) { DrawPipeDetails(doc, pdtls); } doc.Redraw(true); }
public static int DeleteFiguresByLayer(vdLayout layout, vdLayer layer) { var result = 0; for (var i = layout.Entities.Count - 1; i >= 0; i--) { if (layout.Entities[i].Layer == layer) { layout.Entities.RemoveAt(i); ++result; } } return(result); }
private vdRect AppendRect(vdDocument document, Box boundingBox, vdLayer layer = null) { var rect = new vdRect { InsertionPoint = new gPoint(boundingBox.Left, boundingBox.Bottom), Width = boundingBox.Width, Height = boundingBox.Height, Layer = layer ?? document.ActiveLayer, LineType = document.LineTypes.DPIDash, PenColor = new vdColor(System.Drawing.Color.Green) }; document.ActiveLayOut.Entities.AddItem(rect); return(rect); }
public void DrawJointsText(vdDocument doc, double txtSize) { vdLayer nodalLay = null; nodalLay = doc.Layers.FindName("Nodes"); if (nodalLay == null) { nodalLay = new vdLayer(); nodalLay.Name = "Nodes"; nodalLay.SetUnRegisterDocument(doc); nodalLay.setDocumentDefaults(); doc.Layers.AddItem(nodalLay); } nodalLay.PenColor = new vdColor(Color.Magenta); //nodalLay.PenColor = new vdColor(Color.Green); nodalLay.Update(); vdMText vTxt = new vdMText(); vTxt.SetUnRegisterDocument(doc); vTxt.setDocumentDefaults(); vTxt.InsertionPoint = Point; vTxt.Height = txtSize; vTxt.HorJustify = VdConstHorJust.VdTextHorCenter; vTxt.VerJustify = VdConstVerJust.VdTextVerCen; vTxt.TextString = NodeNo.ToString(); vTxt.Layer = nodalLay; doc.ActiveLayOut.Entities.AddItem(vTxt); vdCircle vcir = new vdCircle(); vcir.SetUnRegisterDocument(doc); vcir.setDocumentDefaults(); vcir.Center = Point; vcir.Radius = txtSize; //vcir.TextString = list[i].NodeNo.ToString(); vcir.Layer = nodalLay; doc.ActiveLayOut.Entities.AddItem(vcir); doc.Update(); doc.Redraw(true); }
public void DrawNodes(vdDocument doc) { //nodalDataLay.Name = "NodalData"; //nodalDataLay.SetUnRegisterDocument(doc); //nodalDataLay.setDocumentDefaults(); //doc.Layers.AddItem(nodalDataLay); //nodalDataLay.PenColor = new vdColor(Color.Red); vdLayer pumpLay = new vdLayer(); pumpLay.SetUnRegisterDocument(doc); pumpLay.setDocumentDefaults(); pumpLay.PenColor = new vdColor(Color.LightSeaGreen); foreach (DisNetNode nd in list) { DrawNodes(doc, nd); } doc.Redraw(true); }
public static void Layer_SetCurrent(vdDocument activerDocument, string layerName) { try { vdLayer layer = activerDocument.Layers.FindName(layerName); if (null != layer) { activerDocument.ActiveLayer = layer; } else { return; } } catch { return; } }
public void SetLayers(vdDocument doc) { //Chiranjit [2014 10 31] selectLay = doc.Layers.FindName("Selection"); if (selectLay == null) { selectLay = new vdLayer(); selectLay.Name = "Selection"; selectLay.SetUnRegisterDocument(doc); selectLay.setDocumentDefaults(); selectLay.PenColor = new vdColor(Color.Red); doc.Layers.AddItem(selectLay); } nodesLay = doc.Layers.FindName("Nodes"); if (nodesLay == null) { nodesLay = new vdLayer(); nodesLay.Name = "Nodes"; nodesLay.SetUnRegisterDocument(doc); nodesLay.setDocumentDefaults(); nodesLay.PenColor = new vdColor(Color.Magenta); doc.Layers.AddItem(nodesLay); } membersLay = doc.Layers.FindName("Members"); if (membersLay == null) { membersLay = new vdLayer(); membersLay.Name = "Members"; membersLay.SetUnRegisterDocument(doc); membersLay.setDocumentDefaults(); doc.Layers.AddItem(membersLay); } VectorDraw.Professional.Memory.vdMemory.Collect(); System.GC.Collect(); }
public void DrawSupport_Dump(vdDocument doc) { supportFixedLay.Name = "SupportFixed"; supportPinnedLay.Name = "SupportPinned"; if (doc.Layers.FindName("SupportFixed") == null) { supportFixedLay = new vdLayer(); supportFixedLay.Name = "SupportFixed"; supportFixedLay.SetUnRegisterDocument(doc); supportFixedLay.setDocumentDefaults(); doc.Layers.AddItem(supportFixedLay); } if (doc.Layers.FindName("SupportPinned") == null) { supportPinnedLay = new vdLayer(); supportPinnedLay.Name = "SupportPinned"; supportPinnedLay.SetUnRegisterDocument(doc); supportPinnedLay.setDocumentDefaults(); doc.Layers.AddItem(supportPinnedLay); } try { doc.Layers.AddItem(supportFixedLay); doc.Layers.AddItem(supportPinnedLay); } catch (Exception ex) { } for (int i = 0; i < list.Count; i++) { if (list[i].Option == Support.SupportOption.PINNED) { DrawSupportPinned(doc, list[i].Node.Point); } if (list[i].Option == Support.SupportOption.FIXED) { DrawSupportFixed(doc, list[i].Node.Point); } } }
public CVcadLayer(vdLayer vdlayer) { this.vdobj = vdlayer; }
public static void CmdPipe3DFromText(vdDocument doc, string txtFileName) { Color pipeColor = Color.Green; double pipeSize = 100.0d; vdLayer pipeLay = new vdLayer(); pipeLay.Name = "Pipes"; pipeLay.SetUnRegisterDocument(doc); pipeLay.setDocumentDefaults(); doc.Layers.AddItem(pipeLay); doc.ActiveLayer = pipeLay; vdLayer nodeBallLay = new vdLayer(); nodeBallLay.Name = "NodalData"; nodeBallLay.SetUnRegisterDocument(doc); nodeBallLay.setDocumentDefaults(); doc.Layers.AddItem(nodeBallLay); nodeBallLay.PenColor = new vdColor(Color.Red); string fName = txtFileName; ReadPipes(fName); HEADSNeed.DisNet.frmDrawPipe fdp = new HEADSNeed.DisNet.frmDrawPipe(); if (fdp.ShowDialog() == DialogResult.OK) { pipeColor = fdp.PipeColor; pipeSize = fdp.PipeSize; //doc.ActiveLayer.PenColor = new vdColor(pipeColor); pipeLay.PenColor = new vdColor(pipeColor); } else { return; } for (int i = 0; i < lstPipe.Count; i++) { try { DisNetPipe dnPipe = lstPipe[i]; vdCircle cir = new vdCircle(); cir.Center = dnPipe.StartPoint; cir.Radius = dnPipe.Diameter * pipeSize; //cir.Radius = dnPipe.Diameter; cir.ExtrusionVector = Vector.CreateExtrusion(dnPipe.StartPoint, dnPipe.EndPoint); cir.SetUnRegisterDocument(doc); cir.setDocumentDefaults(); cir.Layer = pipeLay; doc.ActionLayout.Entities.AddItem(cir); cir.Thickness = dnPipe.Length; //cir.PenColor = new vdColor(cl); doc.CommandAction.CmdSphere(dnPipe.EndPoint, cir.Radius, 10, 10); doc.ActiveLayer = nodeBallLay; doc.CommandAction.CmdSphere(dnPipe.EndPoint, cir.Radius + 5.0d, 15, 10); doc.ActiveLayer = pipeLay; doc.CommandAction.Zoom("E", 100, 100); if (i == 0) { vdPolyline pline = new vdPolyline(); pline.VertexList.Add(new gPoint(cir.Center.x - 35.0d, cir.Center.y + 25.0d, cir.Center.z)); pline.VertexList.Add(new gPoint(cir.Center.x - 35.0d, cir.Center.y, cir.Center.z)); pline.VertexList.Add(new gPoint(cir.Center.x + 35.0d, cir.Center.y, cir.Center.z)); pline.VertexList.Add(new gPoint(cir.Center.x + 35.0d, cir.Center.y + 25.0d, cir.Center.z)); pline.SetUnRegisterDocument(doc); pline.setDocumentDefaults(); pline.PenColor = new vdColor(Color.LightPink); pline.PenWidth = 2.0d; doc.ActionLayout.Entities.AddItem(pline); vdLine ln = new vdLine(); ln.SetUnRegisterDocument(doc); ln.setDocumentDefaults(); ln.StartPoint = (pline.VertexList[0] + pline.VertexList[1]) / 2; ln.EndPoint = (pline.VertexList[2] + pline.VertexList[3]) / 2; ln.PenColor = new vdColor(Color.LightPink); ln.PenWidth = 2.0d; doc.ActionLayout.Entities.AddItem(ln); vdText tx = new vdText(); tx.SetUnRegisterDocument(doc); tx.setDocumentDefaults(); tx.InsertionPoint = new gPoint(ln.StartPoint.x + 2.0d, ln.StartPoint.y + 3.0d, ln.StartPoint.z); tx.TextString = "SOURCE"; tx.PenColor = new vdColor(Color.LightPink); tx.Height = 10.0d; doc.ActionLayout.Entities.AddItem(tx); } //doc.Redraw(true); } catch (Exception exx) { } } doc.RenderMode = vdRender.Mode.Wire2dGdiPlus; doc.CommandAction.RegenAll(); doc.Redraw(true); }
public static void CmdPipe3D(vdDocument doc) { Color pipeColor = Color.Green; double pipeSize = 100.0d; vdLayer pipeLay = new vdLayer(); pipeLay.Name = "Pipes"; pipeLay.SetUnRegisterDocument(doc); pipeLay.setDocumentDefaults(); doc.Layers.AddItem(pipeLay); doc.ActiveLayer = pipeLay; //OpenFileDialog ofd = new OpenFileDialog(); //string fName = ""; //ofd.Title = "SELECT DisNet Pipe Details File"; //ofd.Filter = "Text File|*.txt"; //if (ofd.ShowDialog() != DialogResult.Cancel) //{ // fName = ofd.FileName; // ReadPipes(fName); // HEADSNeed.DisNet.frmDrawPipe fdp = new HEADSNeed.DisNet.frmDrawPipe(); // if (fdp.ShowDialog() == DialogResult.OK) // { // pipeColor = fdp.PipeColor; // pipeSize = fdp.PipeSize; // //doc.ActiveLayer.PenColor = new vdColor(pipeColor); // pipeLay.PenColor = new vdColor(pipeColor); // } // else // return; //} //ReadPipes("C:\\DisNetPoints.txt"); for (int i = 0; i < lstPipe.Count; i++) { try { DisNetPipe dnPipe = lstPipe[i]; vdCircle cir = new vdCircle(); cir.Center = dnPipe.StartPoint; cir.Radius = dnPipe.Diameter * pipeSize; //cir.Radius = dnPipe.Diameter; cir.ExtrusionVector = Vector.CreateExtrusion(dnPipe.StartPoint, dnPipe.EndPoint); cir.SetUnRegisterDocument(doc); cir.setDocumentDefaults(); cir.Layer = pipeLay; doc.ActionLayout.Entities.AddItem(cir); cir.Thickness = dnPipe.Length; //cir.PenColor = new vdColor(cl); doc.CommandAction.CmdSphere(dnPipe.EndPoint, cir.Radius, 10, 10); doc.CommandAction.Zoom("E", 100, 100); //doc.Redraw(true); } catch (Exception exx) { } } doc.RenderMode = vdRender.Mode.Render; doc.CommandAction.RegenAll(); doc.Redraw(true); }
public void DrawEnvelop(vdDocument doc) { if (Members == null) { Set_Members(); } vdLayer elementLay = new vdLayer(); elementLay.Name = "ENVELOPE"; elementLay.SetUnRegisterDocument(doc); elementLay.setDocumentDefaults(); elementLay.PenColor = new vdColor(Color.DarkGreen); doc.Layers.AddItem(elementLay); doc.Palette.Background = Color.White; VectorDraw.Professional.vdFigures.vdPolyline one3dface = new vdPolyline(); vdLine ln = null; vdMText mtxt = null; one3dface.SetUnRegisterDocument(doc); one3dface.setDocumentDefaults(); VectorDraw.Geometry.gPoint gp = new VectorDraw.Geometry.gPoint(); for (var item = 0; item < Members.Count; item++) { ln = new vdLine(); ln.SetUnRegisterDocument(doc); ln.setDocumentDefaults(); mtxt = new vdMText(); mtxt.SetUnRegisterDocument(doc); mtxt.setDocumentDefaults(); mtxt.HorJustify = VdConstHorJust.VdTextHorCenter; mtxt.Height = 0.3; mtxt.TextString = Forces[item].ToString("f3"); mtxt.Layer = elementLay; gp = new gPoint(); gp.x = (Members[item].StartNode.Point.x + Members[item].EndNode.Point.x) / 2; gp.y = Members[item].StartNode.Point.y; gp.z = Members[item].StartNode.Point.z; ln.StartPoint = gp; gp = new gPoint(); gp.x = (Members[item].StartNode.Point.x + Members[item].EndNode.Point.x) / 2; gp.y = Members[item].EndNode.Point.y + Forces[item] * factor; gp.z = Members[item].StartNode.Point.z; ln.EndPoint = gp; mtxt.InsertionPoint = gp; doc.ActiveLayOut.Entities.AddItem(mtxt); ln.Layer = elementLay; doc.ActiveLayOut.Entities.AddItem(ln); one3dface.VertexList.Add(gp); Members.DrawMember(Members[item], doc); } one3dface.SPlineFlag = VdConstSplineFlag.SFlagFITTING; one3dface.Layer = elementLay; doc.ActiveLayOut.Entities.AddItem(one3dface); //VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_ShadeOn(doc); }
public void DrawElements(vdDocument doc) { vdLayer elementLay = new vdLayer(); elementLay.Name = "Elements"; elementLay.SetUnRegisterDocument(doc); elementLay.setDocumentDefaults(); //elementLay.PenColor = new vdColor(Color.Gray); elementLay.PenColor = new vdColor(Color.DarkGreen); doc.Layers.AddItem(elementLay); foreach (Element elmt in list) { //We will create a vdPolyface object and add it to the Active Layout which is the basic Model Layout always existing in a Document. VectorDraw.Professional.vdFigures.vd3DFace one3dface = new VectorDraw.Professional.vdFigures.vd3DFace(); //VectorDraw.Professional.vdFigures.vdPolyline one3dface = new vdPolyline(); //We set the document where the polyface is going to be added.This is important for the vdPolyface in order to obtain initial properties with setDocumentDefaults. one3dface.SetUnRegisterDocument(doc); one3dface.setDocumentDefaults(); //if ((elmt.Node1.Point.x == elmt.Node2.Point.x) && // (elmt.Node1.Point.x == elmt.Node3.Point.x) && // (elmt.Node1.Point.x == elmt.Node4.Point.x)) //{ // one3dface.ExtrusionVector = new Vector(1.0, 0.0, 0.0); //} //else if ((elmt.Node1.Point.y == elmt.Node2.Point.y) && // (elmt.Node1.Point.y == elmt.Node3.Point.y) && // (elmt.Node1.Point.y == elmt.Node4.Point.y)) //{ // one3dface.ExtrusionVector = new Vector(0.0, 1.0, 0.0); //} VectorDraw.Geometry.gPoints gpts = new VectorDraw.Geometry.gPoints(); one3dface.VertexList.RemoveAll(); one3dface.VertexList.Add(elmt.Node1.Point); one3dface.VertexList.Add(elmt.Node2.Point); one3dface.VertexList.Add(elmt.Node3.Point); one3dface.VertexList.Add(elmt.Node4.Point); one3dface.VertexList.Add(elmt.Node1.Point); //vdHatchProperties Properties = new vdHatchProperties(); //Properties.SetUnRegisterDocument(doc); //Properties.FillMode = VdConstFill.VdFillModeSolid; //Properties.FillBkColor = new vdColor(Color.DarkGreen); //Properties.FillColor = new vdColor(Color.DarkGreen); //one3dface.HatchProperties = Properties; //one3dface.VertexList = gpts; one3dface.Layer = elementLay; //one3dface.visibility one3dface.Update(); //Now we will add this object to the Entities collection of the Model Layout(ActiveLayout). doc.ActiveLayOut.Entities.AddItem(one3dface); //View3DShadeOn VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_ShadeOn(doc); one3dface.ToolTip = "Element No: " + elmt.ElementNo + " [" + elmt.Node1.NodeNo + "," + elmt.Node2.NodeNo + "," + elmt.Node3.NodeNo + "," + elmt.Node4.NodeNo + "]"; } }
private void Fill_Slab(string beam_nos, bool isOk) { MyStrings mlist = new MyStrings(beam_nos.Trim(), ' '); MemberIncidenceCollection mic = new MemberIncidenceCollection(); for (int i = 0; i < mlist.Count; i++) { mic.Add(AST_DOC.Members.Get_Member(mlist.GetInt(i))); } JointCoordinateCollection jntc = new JointCoordinateCollection(); vdPolyline vdpl = new vdPolyline(); vdpl.SetUnRegisterDocument(VDoc); vdpl.setDocumentDefaults(); for (int i = 1; i < mic.Count; i++) { if (mic[i - 1].StartNode == mic[i].StartNode) { if (!jntc.Contains(mic[i].StartNode)) { jntc.Add(mic[i].StartNode); } } else if (mic[i - 1].EndNode == mic[i].StartNode) { if (!jntc.Contains(mic[i].StartNode)) { jntc.Add(mic[i].StartNode); } } else if (mic[i - 1].StartNode == mic[i].EndNode) { if (!jntc.Contains(mic[i].EndNode)) { jntc.Add(mic[i].EndNode); } } else if (mic[i - 1].EndNode == mic[i].EndNode) { if (!jntc.Contains(mic[i].EndNode)) { jntc.Add(mic[i].EndNode); } } else { //string ss = Slab_Data[beam_nos] as string; //if (ss != null) // Slab_Data.Remove(beam_nos); //Save_Data(); MessageBox.Show("Beam " + mic[i].MemberNo + " and Beam " + mic[i - 1].MemberNo + " Joints are mismatch..", "ASTRA", MessageBoxButtons.OK); return; } } if (!jntc.Contains(mic[0].StartNode)) { jntc.Add(mic[0].StartNode); } if (!jntc.Contains(mic[0].EndNode)) { jntc.Add(mic[0].EndNode); } jntc.Add(jntc[0]); double max_z = AST_DOC.Joints.Max_Z_Positive; foreach (var item in jntc) { //vdpl.VertexList.Add(item.Point); vdpl.VertexList.Add(new gPoint(item.X, max_z - item.Z)); } //if (File.Exists(Slab_des.Get_Report_File(beam_nos, cmb_flr_lvl.Text))) //{ // vdpl.ToolTip = File.ReadAllText(Slab_des.Get_Report_File(beam_nos, cmb_flr_lvl.Text)); // vdpl.ToolTip = " //} vdpl.ToolTip = "Member surrounded : " + beam_nos; vdLayer vlay = VDoc.Layers.FindName("slab"); if (vlay == null) { vlay = new vdLayer(VDoc, "slab"); vlay.SetUnRegisterDocument(VDoc); vlay.setDocumentDefaults(); VDoc.Layers.Add(vlay); } //vlay.Frozen = false; //vlay.Lock = true; vdpl.Layer = vlay; //vdpl.PenColor = new vdColor(Color.DarkGray); if (isOk) { vdpl.PenColor = new vdColor(Color.Green); } else { vdpl.PenColor = new vdColor(Color.Red); } vdpl.HatchProperties = new vdHatchProperties(VectorDraw.Professional.Constants.VdConstFill.VdFillModeHatchFDiagonal); //vdpl.ExtrusionVector = new Vector(0.0, 1.0, 0.0); VDoc.ActiveLayOut.Entities.Add(vdpl); VDoc.ActiveLayOut.Entities.ChangeOrder(vdpl, true); VDoc.Redraw(true); }