Article | 60001607 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 1/19/2012 |
Submitted by | Gizem Basturk |
Keywords |
Doc.FilterActionPoint += new vdDocument.FilterActionPointEventHandler(ActiveDocument_FilterActionPoint);Define the Queue :
QueueAnd the code you need for the event:queue = new Queue (20);
void ActiveDocument_FilterActionPoint(object sender, object action, ref gPoint pt) { if (queue.Contains(pt) || queue.Count>19) // keep only 20 gPoints in history { gPoint toPt = queue.Dequeue(); } queue.Enqueue(pt); }If you want to check the for debuging you can use a TextBox and fill it like :
string str = ""; gPoint[] array = new gPoint[queue.Count]; // Copy the Queue to the int array. queue.CopyTo(array, 0); // Loop through and display the array in order. str += "Array:" + "\r\n"; for (int i = 0; i < array.Length; i++) { str= str + i.ToString() + " " + array[i].ToString()+"\r\n"; } textBox1.Text = str;