Article | 60001293 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 1/26/2011 |
Submitted by | M. Hosan |
Keywords |
private void button2_Click(object sender, EventArgs e) { bool flag = MultipleCopy(vdFramedControl1.BaseControl.ActiveDocument); this.Text = flag.ToString(); } private Boolean MultipleCopy(vdDocument doc) { bool isCopy = true; doc.Prompt("Select Entities to copy: "); if (!doc.CommandAction.CmdSelect("USER")) { doc.Prompt(""); return false; } vdSelection sel = doc.Selections.FindName("VDRAW_PREVIOUS_SELSET"); if ((sel == null) | (sel.Count < 1)) return false; doc.Prompt("Copy from Point: "); gPoint ptFrom = doc.ActionUtility.getUserPoint() as gPoint; if ((ptFrom == null)) { doc.Prompt(""); return false; } int i = 0; while (isCopy) { isCopy = doc.CommandAction.CmdCopy(sel, ptFrom, "USER"); if ((i==0) & (isCopy==false)) { doc.Prompt(""); return false; } i++; } doc.Prompt(""); return true; }