Hello everyone,
I have got a problem about getting user input.
In a function i am first getting a selection from the user by editor.getselection(...)
then i show a paletteset with my usercontrol in the same function. everything is fine so far.
but after showing paletteset i try to get a string from the user by editor.getstring(...) in the same function but statement continues as i never request it. when i check the PromptResult status it is equal to cancel.
i mean
Transaction acTrans = null;
Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
Database acCurDb = acDoc.Database;
acDocLock = acDoc.LockDocument();
using (acDocLock)
{
PromptSelectionOptions acOPrompt = new PromptSelectionOptions();
acOPrompt.MessageForAdding = "Select objects";
PromptSelectionResult acSPrompt = acDoc.Editor.GetSelection(acOPrompt);
if (acSPrompt.Status == PromptStatus.OK)
{
acTrans = acCurDb.TransactionManager.StartTransaction();
try
{
// Process selected objects
ShowPalette(true);
PromptStringOptions pso = new PromptStringOptions("Enter name for selection");
pso.AllowSpaces = true;
PromptResult pr;
do
{
pr = acDoc.Editor.GetString(pso); //--------->never stop there if showpalette is executed.
} while (pr.Status == PromptStatus.OK);
i tried to lock the document but it doesnt work either. when i comment out "showpalette(true)" it works correctly.
can anyone help me about this problem.
thanks in advance.