Message 1 of 4
.Net equivalent to Esc key
Not applicable
05-18-2012
06:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
Rewriting old VBA code in .Net C#. Strugeling with finding a way to send Esc key. Chr(27) worked fine in VBA.
This VBA code is updating the block definition but aborts by Esc key before insertion.
ThisDrawing.SendCommand ("-insert" + vbLf + "STREAM003=C:/CAD/GDIR/Library/STREAM/STREAM003.DWG" + vbLf + "y" + vbLf + Chr(27))
Tried the same using ACADCMD but this results in 'Requires numeric distance or two points.' in the commandline.
ResultBuffer rb = newResultBuffer();
rb.Add(newTypedValue(5005, "-INSERT"));
rb.Add(newTypedValue(5005, BlockString));
rb.Add(newTypedValue(5005, "y"));
rb.Add(newTypedValue(5005, (char)27));
acedCmd(rb.UnmanagedObject);
Any ideas?