Get selected entities using SelectPrevious()
Not applicable
01-28-2016
09:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm traing to select entities which were selected before ending command.
Here the code:
PromptSelectionResult selectionResult = ed.SelectPrevious(); if (selectionResult.Status == PromptStatus.OK) { using (Transaction tr = doc.Database.TransactionManager.StartTransaction()) { SelectionSet previousSelectedEntities = selectionResult.Value; ObjectId[] objIds = previousSelectedEntities.GetObjectIds(); Autodesk.AutoCAD.Internal.Utils.SelectObjects(objIds); ed.Regen(); } }
But selectionResult.Status return Error.
How solve this problem?
Link copied