0
我寫了這個代碼:的Autocad右鍵單擊事件處理程序
int count = 1;
while (true)
{
pointOptions.Message = "\nEnter the end point of the line: ";
pointOptions.UseBasePoint = true;
pointOptions.BasePoint = drawnLine.EndPoint;
pointResult = editor.GetPoint(pointOptions);
if (pointResult.Status == PromptStatus.Cancel)
{
break;
}
if (count == 1)
{
drawnLine.AddVertexAt(count, pointResult.Value.Convert2d(new Plane()), 0, 0, 0);
blockTableRecord.AppendEntity(drawnLine);
transaction.AddNewlyCreatedDBObject(drawnLine, true);
}
else
{
stretch(drawnLine, pointResult.Value, Point3d.Origin);
}
editor.Regen();
count++;
}
代碼工作正常,但到coplete圖紙我必須鍵入ESC,我想請右鍵單擊或空格鍵點擊閉上loop.Can我能做到嗎?
PromptPointOptions即時使用和pointOptions是變量。 –
我會等待:) –
@AntonioPapa更新。 –