Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, Hope someone can help here..
I have a palette with a button. I'd like to be able to repeat the button command if space or enter is pressed.
But I also may have preselected objects to base the command on (otherwise it needs a pickfirst selection).
For some reason SendStringToExecute clears the current selectionset and I need to reselect an entity.
While calling the Sub directly doesn't allow the command to be repeated and ignores the DR CommandMethod call.
Is there another way to achieve this?
Private Sub btnDraw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDraw.Click Dim doc As Document = Application.DocumentManager.MdiActiveDocument Dim mycommands As New Commands mycommands.Draw() 'doc.SendStringToExecute("DR ", True, False, True) End Sub
<CommandMethod("DR")> _ Sub Draw() 'If selectedobjects.count>0 then ... End Sub
Solved! Go to Solution.