public ActionBlink(gPoint reference, vdLayout layout) : base(reference, layout) { ValueTypeProp |= valueType.DISTANCE; figure = new VectorDrawBlink(); figure.SetUnRegisterDocument(layout.Document); figure.setDocumentDefaults(); figure.Origin = reference; }
public ActionASTRASupportFixed(gPoint reference, vdLayout layout) : base(reference, layout) { ValueTypeProp |= valueType.DISTANCE; figure = new ASTRASupportFixed(); figure.SetUnRegisterDocument(layout.Document); figure.setDocumentDefaults(); figure.Origin = reference; }
public ActionASTRAMemberLoad(gPoint reference, vdLayout layout) : base(reference, layout) { line = new ASTRAMemberLoad(); line.SetUnRegisterDocument(layout.Document); line.setDocumentDefaults(); line.StartPoint = reference; line.EndPoint = reference; }
public static vdSelection GetGripSelection(vdLayout layout) { var gripsetname = "VDGRIPSET_" + layout.Handle.ToStringValue(); if (layout.ActiveViewPort != null) { gripsetname = gripsetname + layout.ActiveViewPort.Handle.ToStringValue(); } var gripset = layout.Document.Selections.FindName(gripsetname); return(gripset); }
public ActionDisNetCommands(gPoint startPoint, vdLayout layout, gPoint endPoint) : base(startPoint, layout) { ValueTypeProp |= valueType.DISTANCE; figure = new vdLine(); figure.SetUnRegisterDocument(layout.Document); figure.setDocumentDefaults(); figure.StartPoint = startPoint; figure.EndPoint = startPoint; figure.ExtrusionVector = Vector.CreateExtrusion(startPoint, endPoint); figure.Thickness = startPoint.Distance3D(endPoint); }
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); }
//public ActionPipe3D(int NumSides, string text, double textheight, gPoint reference, vdLayout layout,gPoint endPoint) // : base(reference, layout) public ActionPipe3D(int NumSides, double height, gPoint reference, vdLayout layout, gPoint endPoint) : base(reference, layout) { ValueTypeProp |= valueType.DISTANCE; figure = new Pipe3D(); figure.SetUnRegisterDocument(layout.Document); figure.setDocumentDefaults(); figure.Origin = reference; figure.Radius = 0.0d; //figure.TextHeight = textheight; //figure.TextString = text; figure.NumSides = NumSides; figure.PipeHeight = height; // Chiranjit 11/08/2009 figure.StartPoint = reference; figure.EndPoint = endPoint; }
public frmProperty() { InitializeComponent(); try { //foreach (vdSectionClip sclp in doc.ActiveLayOut.Sections) //{ // vdBase.ActiveDocument.ActiveLayOut.Sections.AddItem(sclp); //} //vdBase.ActiveDocument.ActiveLayOut = doc.ActiveLayOut; lay = new vdLayout(); } catch (Exception exx) { MessageBox.Show(exx.ToString()); } }
/// <summary> /// 切换布局事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void layoutsComboBox_SelectedIndexChanged(object sender, EventArgs e) { try { int selected = this.layoutsComboBox.SelectedIndex; vdLayout layout = null; if (selected == 0) { layout = document.Model; } else if (selected >= 1) { layout = document.LayOuts[selected - 1]; } selectedLayout = selected; if (selectedLayout == 0) { this.currentLayoutValueLabel.Text = "Model"; } else if (selectedLayout > 0) { this.currentLayoutValueLabel.Text = "布局" + selectedLayout; } if (graph != null) { graph.Clear(); } graph = new Graph(layout); graph.split(); MessageBox.Show("切换布局完毕!"); } catch { MessageBox.Show("切换布局失败!"); } }