2012년 3월 27일 화요일

GetString Method



using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;

[CommandMethod("GetStringFromUser")]
public static void GetStringFromUser()
{
  Document acDoc = Application.DocumentManager.MdiActiveDocument;

  PromptStringOptions pStrOpts = new PromptStringOptions("\nEnter your name: ");
  pStrOpts.AllowSpaces = true;
  PromptResult pStrRes = acDoc.Editor.GetString(pStrOpts);

  Application.ShowAlertDialog("The name entered was: " +
                              pStrRes.StringResult);
}

댓글 없음 :

댓글 쓰기