Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have commands that ask the user to select objects. Nothing fancy just like below. After the command does what it needs to do, the objects are unselected. What is causing the unselecting of the objects? Is there a way to maintain the selection?
Ideally, the objects would stay selected because there are subsequent commands that will be run that will require the same objects to be selected again.
// Request for objects to be selected in the drawing area
PromptSelectionResult acSSPrompt = doc.Editor.GetSelection();
// If the prompt status is OK, objects were selected
if (acSSPrompt.Status == PromptStatus.OK)
{
SelectionSet acSSet = acSSPrompt.Value;
// Step through the objects in the selection set
foreach (SelectedObject acSSObj in acSSet)
{
// Do something here.
}
}
tr.Commit();
Solved! Go to Solution.