Message 1 of 3
Implied selection problem
Not applicable
12-24-2010
08:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a problem when i try to run a commend called by a FeatureUpdated event, i try to select the implied selected feature using this code :
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim result As PromptSelectionResult = ed.SelectImplied()
If result.Status <> PromptStatus.OK Then Exit Sub
Dim MgSelBase As MgSelectionBase = AcMapFeatureEntityService.GetSelection(result.Value)
Dim Mglayers As MgReadOnlyLayerCollection = MgSelBase.GetLayers()
Dim layerBase As MgLayerBase = MgSelBase.GetLayers(0)
Dim featReader As MgFeatureReader = MgSelBase.GetSelectedFeatures(layerBase, layerBase.FeatureClassName, False)
While featReader.ReadNext
' operations
End While
This code makes autocad crash
the same thing hapen when it's used by a user selection(ed.GetSelection(entOptions)) instead of an event
Has anyone encountered the same problem ?